Skip to content

Commit

Permalink
Don't fail if PostalVotingRequirementsMatcher fails
Browse files Browse the repository at this point in the history
  • Loading branch information
symroe committed May 1, 2024
1 parent 8be93e0 commit 5314cc4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions wcivf/apps/elections/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,10 +700,13 @@ def get_voter_id_requirements(self):

@property
def get_postal_voting_requirements(self):
matcher = PostalVotingRequirementsMatcher(
self.ballot_paper_id, nation=self.post.territory
)
return matcher.get_postal_voting_requirements()
try:
matcher = PostalVotingRequirementsMatcher(
self.ballot_paper_id, nation=self.post.territory
)
return matcher.get_postal_voting_requirements()
except Exception:
return None


class VotingSystem(models.Model):
Expand Down

0 comments on commit 5314cc4

Please sign in to comment.