Skip to content

Commit

Permalink
Add IDs to ballot measure contest selections.
Browse files Browse the repository at this point in the history
Fixes BallotLab TrustTheVote-Project#86.
  • Loading branch information
ion-oset committed Aug 29, 2022
1 parent 4d1bfb4 commit 8fd9337
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/electos/ballotmaker/scripts/ballot-lab-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ def extract_ballot_measure_contest(contest: BallotMeasureContest, index):
assert isinstance(selection, BallotMeasureSelection), \
f"Unexpected non-ballot measure selection: {type(selection).__name__}"
choice = text_content(selection.selection)
choices.append(choice)
choices.append({
"id": selection.model__id,
"choice": choice,
})
district = contest_election_district(contest, index)
full_text = text_content(contest.full_text)
result = {
Expand Down

0 comments on commit 8fd9337

Please sign in to comment.