From bd9891fe5ef4082ed18208afa7669d36a24faf24 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Wed, 21 Sep 2011 21:21:01 +0200 Subject: [PATCH] Show results for elected candidates only (assignment beamer view). --- openslides/agenda/views.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/openslides/agenda/views.py b/openslides/agenda/views.py index 100dba4db..356307f8e 100644 --- a/openslides/agenda/views.py +++ b/openslides/agenda/views.py @@ -120,11 +120,14 @@ def assignment_votes(item): for poll in assignment.poll_set.all(): if poll.published: if candidate in poll.options_values: - option = Option.objects.filter(poll=poll).filter(user=candidate)[0] - if poll.optiondecision: - tmplist[1].append([option.yes, option.no, option.undesided]) + if assignment.is_elected(candidate): + option = Option.objects.filter(poll=poll).filter(user=candidate)[0] + if poll.optiondecision: + tmplist[1].append([option.yes, option.no, option.undesided]) + else: + tmplist[1].append(option.yes) else: - tmplist[1].append(option.yes) + tmplist[1].append("") else: tmplist[1].append("-") votes.append(tmplist)