Skip to content
Snippets Groups Projects
Commit 5502f694 authored by Ben Adida's avatar Ben Adida
Browse files

more efficient traversal of voters

parent 78dc2c7e
No related branches found
No related tags found
No related merge requests found
......@@ -371,8 +371,7 @@ class Election(HeliosModel):
tally the election, assuming votes already verified
"""
tally = self.init_tally()
for voter in self.voter_set.all():
if voter.vote:
for voter in self.voter_set.exclude(vote=None):
tally.add_vote(voter.vote, verify_p=False)
self.encrypted_tally = tally
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment