Commit fc857945 authored by Christophe Siraut's avatar Christophe Siraut

Fixing #892 continuation.

parent 3d23d1b4
...@@ -188,10 +188,9 @@ def vote(request, poll_id): ...@@ -188,10 +188,9 @@ def vote(request, poll_id):
return HttpResponse(vorm.cleaned_data['choice']) return HttpResponse(vorm.cleaned_data['choice'])
if not Vote.objects.filter(choice=choice,bulletin=bulletin): if not Vote.objects.filter(choice=choice,bulletin=bulletin):
vorm.cleaned_data['choice'] = choice new = Vote(choice=choice,bulletin=bulletin,comment=vorm.cleaned_data['comment'])
new = vorm.save(commit=False) if vorm.cleaned_data['voice']:
new.bulletin = bulletin new.voice = vorm.cleaned_data['voice']
#new.choice = choice
new.save() new.save()
if new.voice: if new.voice:
choice.votecount += 1 choice.votecount += 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment