From 9e6aa796ab6f361264e15c6f8666f1778ee56b03 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Thu, 12 Apr 2012 16:37:04 +0200 Subject: [PATCH] fixed error in emty poll in assignment --- openslides/assignment/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openslides/assignment/views.py b/openslides/assignment/views.py index bab780075..0b7dd8430 100644 --- a/openslides/assignment/views.py +++ b/openslides/assignment/views.py @@ -81,7 +81,10 @@ def view(request, assignment_id=None): # exisitiert der Spieler in der poll if poll.get_options().filter(candidate=candidate).exists(): option = AssignmentOption.objects.filter(poll=poll).get(candidate=candidate) - tmplist[1].append(option.get_votes()[0]) + try: + tmplist[1].append(option.get_votes()[0]) + except IndexError: + tmplist[1].append('–') else: tmplist[1].append("-") votes.append(tmplist)