diff options
author | Artur Smęt <artur.smet@mirumee.com> | 2016-10-19 16:07:28 +0200 |
---|---|---|
committer | Artur Smęt <artur.smet@mirumee.com> | 2016-10-25 17:05:01 +0200 |
commit | 5003780cb5fe5e1e5fe0bfd1f1d7de2fa78c6065 (patch) | |
tree | 11ccf8e164212dbe9bea5a4cb7ca16432aae3b47 /saleor/userprofile | |
parent | 26b4ca05d404edc048cbb9e953510becbdfab9cb (diff) | |
download | saleor-frontend-5003780cb5fe5e1e5fe0bfd1f1d7de2fa78c6065.tar.gz saleor-frontend-5003780cb5fe5e1e5fe0bfd1f1d7de2fa78c6065.tar.bz2 saleor-frontend-5003780cb5fe5e1e5fe0bfd1f1d7de2fa78c6065.zip |
Fix country validation in i18n logic
Diffstat (limited to 'saleor/userprofile')
-rw-r--r-- | saleor/userprofile/i18n.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/saleor/userprofile/i18n.py b/saleor/userprofile/i18n.py index eab50841..bea78ad1 100644 --- a/saleor/userprofile/i18n.py +++ b/saleor/userprofile/i18n.py @@ -92,7 +92,7 @@ class CountryAwareAddressForm(AddressForm): ('postal_code', ['postal_code']), ('city', ['city']), ('sorting_code', ['sorting_code']), - ('country_code', ['country_code']) + ('country_code', ['country']) ) class Meta: @@ -114,7 +114,7 @@ class CountryAwareAddressForm(AddressForm): def validate_address(self, data): try: - data['country_code'] = data['country'] + data['country_code'] = data.get('country', '') if data['street_address_1'] or data['street_address_2']: data['street_address'] = '%s\n%s' % ( data['street_address_1'], data['street_address_2']) |