Skip to content

Commit

Permalink
pass the return value of default_countries() rather than the function…
Browse files Browse the repository at this point in the history
… into the validator in save method on GenericData class
  • Loading branch information
Moggach committed Dec 12, 2024
1 parent a932cab commit 8fb1963
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hub/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,9 +822,9 @@ def get_postcode_data(self) -> Optional[PostcodesIOResult]:
def save(self, *args, **kwargs):
if self.phone:
try:
self.phone = validate_and_format_phone_number(
self.phone, default_countries
)
self.phone = validate_and_format_phone_number(
self.phone, default_countries()
)
except ValidationError as e:
raise ValidationError({"phone": f"Invalid phone number: {e}"})

Expand Down

0 comments on commit 8fb1963

Please sign in to comment.