Skip to content

Commit 6ddf87e

Browse files
committed
Fix candidate/party splitting
handle the case where candidate name includes a semicolon
1 parent 75eefae commit 6ddf87e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zeus/election.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ def get_results_pretty(self):
646646
candidate_sums = 0
647647

648648
for candidate_count, candidate in results['candidate_counts']:
649-
cand_party, candidate = candidate.split(": ")
649+
cand_party, candidate = candidate.split(": ", 1)
650650

651651
if candidate in candidates and cand_party == party:
652652
candidate_sums += count

0 commit comments

Comments
 (0)