Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # covert num_reps to a int or raise an error if it doesn't exist or isn't an init
- try:
- num_reps = believe_num_reps_post.__getitem__(int(key))
- except IndexError:
- num_reps = ""
- try:
- num_reps = int(str(num_reps))
- except (ValueError, TypeError):
- error = True
- raise forms.ValidationError("Please select the number of representatives you are sending to this event.")
Add Comment
Please, Sign In to add comment