refactored a little

This commit is contained in:
Anatoly 2020-01-31 13:43:44 +03:00
parent 095cc2cb91
commit 08831de43a
2 changed files with 3 additions and 1 deletions

View File

@ -79,7 +79,7 @@ class Country(TranslatedFieldsMixin,
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']"
return f'{[f"+{i}" for i in set(settings.CALLING_CODES_ANTILLES_GUYANE_WEST_INDIES)]}'
return f'+{self.calling_code}'

View File

@ -560,3 +560,5 @@ COUNTRY_CALLING_CODES = {
"jp": 81, # Japan
"aa": 590 # Guyane West Indies
}
CALLING_CODES_ANTILLES_GUYANE_WEST_INDIES = [590, 594, 1758]