Upgrade pycountry for python3

This commit is contained in:
Michael Youngstrom
2019-02-01 09:35:36 -05:00
parent fb5d2b8806
commit 3bb44a540f
5 changed files with 15 additions and 15 deletions

View File

@@ -263,8 +263,8 @@ def get_localized_price_text(price, request):
# Override default user_currency if location is available
if user_location and get_currency_data:
currency_data = get_currency_data()
user_country = pycountry.countries.get(alpha2=user_location)
user_currency = currency_data.get(user_country.alpha3, user_currency)
user_country = pycountry.countries.get(alpha_2=user_location)
user_currency = currency_data.get(user_country.alpha_3, user_currency)
return format_price(
price=(price * user_currency['rate']),