Skip to content

Saleor Core: the high performance, composable, headless commerce API.

WIP: messy version with commented content

akjanik54090e10e50f
diff --git a/saleor/userprofile/forms.py b/saleor/userprofile/forms.py
index 8fc31e50ca..4dadb7e4e9 100644
--- a/saleor/userprofile/forms.py
+++ b/saleor/userprofile/forms.py
@@ -16,15 +16,9 @@ def get_address_form(data, country_code, initial=None, instance=None, **kwargs):
country_code = country_form.cleaned_data['country']
preview = country_form.cleaned_data['preview']
- phone = str(instance.phone.national_number) if instance else ''
- phoneprefix = str(instance.phone.country_code) if instance else ''
-
if data:
phoneprefix = data.get('phoneprefix')
phone = data.get('phone')
- if instance:
- instance.phone.country_code = phoneprefix
- instance.phone.national_number = phone
address_form_class = get_address_form_class(country_code)
diff --git a/saleor/userprofile/i18n.py b/saleor/userprofile/i18n.py
index 797fb23941..40d0a5aaaf 100644
--- a/saleor/userprofile/i18n.py
+++ b/saleor/userprofile/i18n.py
@@ -22,7 +22,6 @@ UNKNOWN_COUNTRIES = set()
phone_prefixes = [
(k,'+{}'.format(k)) for (k, v) in COUNTRY_CODE_TO_REGION_CODE.items()]
-# import ipdb;
AREA_TYPE_TRANSLATIONS = {
'area': pgettext_lazy('Address field', 'Area'),
'county': pgettext_lazy('Address field', 'County'),
@@ -210,7 +209,6 @@ def get_address_form_class(country_code):
def get_form_i18n_lines(form_instance):
- # import ipdb; ipdb.set_trace()
country_code = form_instance.i18n_country_code
try:
fields_order = i18naddress.get_field_order(