Skip to content

Commit

Permalink
Make except clause more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
georgehelman committed Nov 26, 2024
1 parent bd17e35 commit 8a66edb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dear_petition/petition/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def dehydrate_sex(self, record):
sex = getattr(record, "sex")
try:
sex_value = constants.SEX_CHOICES[sex]
except:
except KeyError:
sex_value = constants.NOT_AVAILABLE
return sex_value

Expand Down

0 comments on commit 8a66edb

Please sign in to comment.