Fix assignment poll choosing the right method (yes-no-abstain True or False)

This commit is contained in:
Norman Jäckel 2012-11-21 15:03:29 +01:00
parent 00e77ba0fc
commit 06af94fb91

View File

@ -293,7 +293,7 @@ class AssignmentPoll(BasePoll, CountInvalid, CountVotesCast, PublishPollMixin):
self.yesnoabstain = True
else:
# candidates <= available posts -> yes/no/abstain
if self.assignment.assignment_candidats.filter(elected=False).count() <= (self.assignment.posts):
if len(self.assignment.candidates) <= (self.assignment.posts - len(self.assignment.elected)):
self.yesnoabstain = True
else:
self.yesnoabstain = False