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.
2 parents 959b029 + 4994cdf commit 9c9d045Copy full SHA for 9c9d045
app/utils/countrycodes.py
@@ -373,10 +373,5 @@ def country_code(country):
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