Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix setting default phone prefix
akjanik2e0b3828bb21
diff --git a/saleor/checkout/core.py b/saleor/checkout/core.pyindex 76d9f4707f..a954bee7fa 100644--- a/saleor/checkout/core.py+++ b/saleor/checkout/core.py@@ -410,7 +410,6 @@ def load_checkout(view):except KeyError:session_data = ''tracking_code = analytics.get_client_id(request)- # import ipdb; ipdb.set_trace()checkout = Checkout.from_storage(session_data, cart, request.user, tracking_code)response = view(request, checkout, cart)diff --git a/saleor/userprofile/forms.py b/saleor/userprofile/forms.pyindex f3f51d2e85..395b9924b6 100644--- a/saleor/userprofile/forms.py+++ b/saleor/userprofile/forms.py@@ -11,12 +11,13 @@ from .i18n import AddressMetaForm, get_address_form_classdef get_address_form(data, country_code, initial=None, instance=None, **kwargs):country_form = AddressMetaForm(data, initial=initial)preview = False-if country_form.is_valid():country_code = country_form.cleaned_data['country']preview = country_form.cleaned_data['preview']- if initial is None and country_code:- initial = {}++ if initial is None and country_code:+ initial = {}+ if country_code:initial['phone'] = '+{}'.format(country_code_for_region(country_code))address_form_class = get_address_form_class(country_code)