Skip to content

Commit

Permalink
Update formfields.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chapayevdauren authored Mar 15, 2024
1 parent e9f2e76 commit 177d32b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phonenumber_field/formfields.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def prepare_value(self, value):
phone_region_codes = phonenumbers.data._COUNTRY_CODE_TO_REGION_CODE[
phone_number.country_code
]
except KeyError:
pass
except KeyError as error:
print(error)
else:
if self.region in phone_region_codes:
value = phone_number.as_national
Expand Down

0 comments on commit 177d32b

Please sign in to comment.