Skip to content

Commit

Permalink
Bugfix: Fetching personal data failed if running in a non-concluded e…
Browse files Browse the repository at this point in the history
…lection.
  • Loading branch information
helgihg committed Sep 13, 2018
1 parent 9c8750e commit cbdcafe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
from core.utils import is_ssn_human_or_institution
from core.utils import random_word
from election.models import Election
from election.models import ElectionResult
from issue.forms import DocumentForm
from issue.models import Document
from issue.models import DocumentContent
Expand Down Expand Up @@ -382,7 +383,10 @@ def make_zipfile(output_filename, source_dir):
for election in elections:

if election.results_are_ordered:
user_place = election.result.rows.get(candidate__user_id=user.id).order
try:
user_place = election.result.rows.get(candidate__user_id=user.id).order
except ElectionResult.DoesNotExist:
user_place = 'not-yet-determined'
else:
if election.result.rows.filter(candidate__user_id=user.id).exists():
user_place = 'selected'
Expand Down

0 comments on commit cbdcafe

Please sign in to comment.