Commit ad9cc948 authored by chris's avatar chris

Do not vote on poll creation when user is not authenticated, thanks fred.

parent 30efbad6
......@@ -68,9 +68,7 @@ def editchoices(request, poll_id):
if not '_addanother' in request.POST:
voter = get_voter_name(request)
if not voter:
voter = 'Anonymous'
if not Bulletin.objects.filter(poll=poll.id, voter=voter):
if voter and not Bulletin.objects.filter(poll=poll.id, voter=voter):
bulletin = Bulletin(poll=poll, voter=voter)
bulletin.save()
votes = [Vote(bulletin=bulletin, choice=choice, voice=True)
......
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