refactored a little
This commit is contained in:
parent
095cc2cb91
commit
08831de43a
|
|
@ -79,7 +79,7 @@ class Country(TranslatedFieldsMixin,
|
||||||
if self.code and self.calling_code:
|
if self.code and self.calling_code:
|
||||||
# hardcoded calling numbers for Antilles Guyane West Indies islands.
|
# hardcoded calling numbers for Antilles Guyane West Indies islands.
|
||||||
if self.code.lower() == 'aa':
|
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}'
|
return f'+{self.calling_code}'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -560,3 +560,5 @@ COUNTRY_CALLING_CODES = {
|
||||||
"jp": 81, # Japan
|
"jp": 81, # Japan
|
||||||
"aa": 590 # Guyane West Indies
|
"aa": 590 # Guyane West Indies
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CALLING_CODES_ANTILLES_GUYANE_WEST_INDIES = [590, 594, 1758]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user