Skip to content

Commit

Permalink
Fix candidate/party splitting
Browse files Browse the repository at this point in the history
handle the case where candidate name includes a semicolon
  • Loading branch information
vinilios committed Dec 15, 2017
1 parent 75eefae commit 6ddf87e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zeus/election.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ def get_results_pretty(self):
candidate_sums = 0

for candidate_count, candidate in results['candidate_counts']:
cand_party, candidate = candidate.split(": ")
cand_party, candidate = candidate.split(": ", 1)

if candidate in candidates and cand_party == party:
candidate_sums += count
Expand Down

0 comments on commit 6ddf87e

Please # to comment.