Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
fix: replaced COUNTRIES with countries.countries
neeraj1909fe78e5df42e9
diff --git a/saleor/account/i18n.py b/saleor/account/i18n.pyindex 320fa022f0..39d10fddf3 100644--- a/saleor/account/i18n.py+++ b/saleor/account/i18n.py@@ -4,7 +4,7 @@ import i18naddressfrom django import formsfrom django.forms.forms import BoundFieldfrom django.utils.translation import pgettext_lazy-from django_countries.data import COUNTRIES+from django_countries import countriesfrom phonenumber_field.formfields import PhoneNumberFieldfrom .models import Address@@ -248,7 +248,7 @@ def construct_address_form(country_code, i18n_rules):return class_-for country in COUNTRIES.keys():+for country in countries.countries.keys():try:country_rules = i18naddress.get_validation_rules({'country_code': country})@@ -256,7 +256,7 @@ for country in COUNTRIES.keys():country_rules = i18naddress.get_validation_rules({})UNKNOWN_COUNTRIES.add(country)-COUNTRY_CHOICES = [(code, label) for code, label in COUNTRIES.items()+COUNTRY_CHOICES = [(code, label) for code, label in countries.countries.items()if code not in UNKNOWN_COUNTRIES]# Sort choices list by country nameCOUNTRY_CHOICES = sorted(COUNTRY_CHOICES, key=lambda choice: choice[1])