Skip to content

Commit fe668a4

Browse files
authored
Remove Optional on Ciphertext Ballot Code (#357)
The ballot code can not be optional for the CiphertextBallot
1 parent 9e48f5a commit fe668a4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/electionguard/ballot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ class CiphertextBallot(ElectionObjectBase, CryptoHashCheckable):
672672
contests: List[CiphertextBallotContest]
673673
"""List of contests for this ballot"""
674674

675-
code: Optional[ElementModQ]
675+
code: ElementModQ
676676
"""Unique ballot code for this ballot"""
677677

678678
timestamp: int

src/electionguard/ballot_compact.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def compress_submitted_ballot(
6767
ballot.timestamp,
6868
ballot_nonce,
6969
ballot.code_seed,
70-
get_optional(ballot.code),
70+
ballot.code,
7171
ballot.state,
7272
)
7373

0 commit comments

Comments
 (0)