We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 959b029 commit 7ebcc17Copy full SHA for 7ebcc17
app/utils/countrycodes.py
@@ -372,11 +372,6 @@ def country_code(country):
372
# Look in synonyms if not found.
373
if not country in is_3166_1 and country in synonyms:
374
country = synonyms[country]
375
-
376
- # Return code if country was found.
377
- if country in is_3166_1:
378
- return is_3166_1[country]
379
380
- # Default to default_code.
381
- print("No country_code found for '" + country + "'. Using '" + default_code + "'")
382
- return default_code
+
+ # Get country or fallback to default_code.
+ return is_3166_1.get(country, default_code)
0 commit comments