Show results for elected candidates only (assignment beamer view).
This commit is contained in:
parent
28d7d17587
commit
bd9891fe5e
@ -120,11 +120,14 @@ def assignment_votes(item):
|
|||||||
for poll in assignment.poll_set.all():
|
for poll in assignment.poll_set.all():
|
||||||
if poll.published:
|
if poll.published:
|
||||||
if candidate in poll.options_values:
|
if candidate in poll.options_values:
|
||||||
|
if assignment.is_elected(candidate):
|
||||||
option = Option.objects.filter(poll=poll).filter(user=candidate)[0]
|
option = Option.objects.filter(poll=poll).filter(user=candidate)[0]
|
||||||
if poll.optiondecision:
|
if poll.optiondecision:
|
||||||
tmplist[1].append([option.yes, option.no, option.undesided])
|
tmplist[1].append([option.yes, option.no, option.undesided])
|
||||||
else:
|
else:
|
||||||
tmplist[1].append(option.yes)
|
tmplist[1].append(option.yes)
|
||||||
|
else:
|
||||||
|
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