Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix order of translated country choices
Pacu23cc44cd57805
diff --git a/saleor/account/i18n.py b/saleor/account/i18n.pyindex 320fa022f0..02465b7ccf 100644--- a/saleor/account/i18n.py+++ b/saleor/account/i18n.py@@ -4,6 +4,7 @@ import i18naddressfrom django import formsfrom django.forms.forms import BoundFieldfrom django.utils.translation import pgettext_lazy+from django_countries import countriesfrom django_countries.data import COUNTRIESfrom phonenumber_field.formfields import PhoneNumberField@@ -122,6 +123,7 @@ class AddressForm(forms.ModelForm):def __init__(self, *args, **kwargs):autocomplete_type = kwargs.pop('autocomplete_type', None)super().__init__(*args, **kwargs)+ self.fields['country'].choices = countriesautocomplete_dict = defaultdict(lambda: 'off', self.AUTOCOMPLETE_MAPPING)for field_name, field in self.fields.items():