added hardcoded calling number for Antilles Guyane West Indies islands

This commit is contained in:
Anatoly 2020-01-31 13:36:41 +03:00
parent 11e037f699
commit fb1eee3e4c

View File

@ -76,7 +76,11 @@ class Country(TranslatedFieldsMixin,
@property
def display_calling_code(self):
"""Return formatted calling code."""
return f'+{self.calling_code}' if self.calling_code else None
if self.code and self.calling_code:
# hardcoded calling numbers for Antilles Guyane West Indies islands.
if self.code.lower() == 'aa':
return "['+590', '+594, '+1758', '+590']"
return f'+{self.calling_code}'
class RegionQuerySet(models.QuerySet):