fixed error in emty poll in assignment
This commit is contained in:
parent
fc95d01d07
commit
9e6aa796ab
@ -81,7 +81,10 @@ def view(request, assignment_id=None):
|
|||||||
# exisitiert der Spieler in der poll
|
# exisitiert der Spieler in der poll
|
||||||
if poll.get_options().filter(candidate=candidate).exists():
|
if poll.get_options().filter(candidate=candidate).exists():
|
||||||
option = AssignmentOption.objects.filter(poll=poll).get(candidate=candidate)
|
option = AssignmentOption.objects.filter(poll=poll).get(candidate=candidate)
|
||||||
|
try:
|
||||||
tmplist[1].append(option.get_votes()[0])
|
tmplist[1].append(option.get_votes()[0])
|
||||||
|
except IndexError:
|
||||||
|
tmplist[1].append('–')
|
||||||
else:
|
else:
|
||||||
tmplist[1].append("-")
|
tmplist[1].append("-")
|
||||||
votes.append(tmplist)
|
votes.append(tmplist)
|
||||||
|
Loading…
Reference in New Issue
Block a user