diff options
author | Patryk Zawadzki <patrys@room-303.com> | 2016-10-25 23:51:50 +0200 |
---|---|---|
committer | Patryk Zawadzki <patrys@room-303.com> | 2016-10-25 23:51:50 +0200 |
commit | decf01e43abbb9d245eabe6ea3eaf7ce5376f6c4 (patch) | |
tree | a689f8cf4d34ee6c041b7312c68b7dd4f0893ce8 /saleor/userprofile | |
parent | 85e985775d28c3bc12e772e643064098edcb9f6a (diff) | |
download | saleor-frontend-decf01e43abbb9d245eabe6ea3eaf7ce5376f6c4.tar.gz saleor-frontend-decf01e43abbb9d245eabe6ea3eaf7ce5376f6c4.tar.bz2 saleor-frontend-decf01e43abbb9d245eabe6ea3eaf7ce5376f6c4.zip |
Fix typo and skip handling of sort codes
Diffstat (limited to 'saleor/userprofile')
-rw-r--r-- | saleor/userprofile/i18n.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/saleor/userprofile/i18n.py b/saleor/userprofile/i18n.py index af985cba..5f16b5b2 100644 --- a/saleor/userprofile/i18n.py +++ b/saleor/userprofile/i18n.py @@ -94,9 +94,8 @@ class CountryAwareAddressForm(AddressForm): ('company_name', ['company_name']), ('postal_code', ['postal_code']), ('city', ['city']), - ('sorting_code', ['sorting_code']), - ('country_code', ['country']) - ) + ('sorting_code', []), + ('country_code', ['country'])) class Meta: model = Address @@ -136,7 +135,7 @@ def get_address_form_class(country_code): return COUNTRY_FORMS[country_code] -def get_form_18n_lines(form_instance): +def get_form_i18n_lines(form_instance): country_code = form_instance.i18n_country_code try: fields_order = i18naddress.get_field_order( @@ -188,7 +187,7 @@ def construct_address_form(country_code, i18n_rules): class_ = type(base_class)(str(class_name), (base_class,), form_kwargs) update_base_fields(class_, i18n_rules) class_.i18n_country_code = country_code - class_.i18n_fields_order = property(get_form_18n_lines) + class_.i18n_fields_order = property(get_form_i18n_lines) return class_ |