Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Commit

Permalink
Safe default for votePct for #98
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Jan 27, 2016
1 parent f331a27 commit 64ace0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elections/ap.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def _get_results(self, ftp=None):
ballotOrder=candidate.ballotorder,
# Results
voteCount=int(candrow['vote_count']),
votePct=calculate.percentage(int(candrow['vote_count']), votes_total),
votePct=calculate.percentage(int(candrow['vote_count']), votes_total) or 0.0,
winner=candrow['is_winner'],
# Reporting unit
level=reporting_unit.level,
Expand Down

0 comments on commit 64ace0b

Please sign in to comment.