Skip to content

Commit

Permalink
fix: phone number mapping in address (frappe#198)
Browse files Browse the repository at this point in the history
* fix: phone number mapping in address

* fix: use variable

* fix: minor change
  • Loading branch information
DaizyModi committed Aug 23, 2022
1 parent 48d068a commit 66a3782
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ecommerce_integrations/shopify/customer.py
Expand Up @@ -121,7 +121,11 @@ def _map_address_fields(shopify_address, customer_name, address_type, email):
"state": shopify_address.get("province"),
"pincode": shopify_address.get("zip"),
"country": shopify_address.get("country"),
"phone": validate_phone_number(shopify_address.get("phone"), throw=False) or None,
"email_id": email,
}

phone = shopify_address.get("phone")
if validate_phone_number(phone, throw=False):
address_fields["phone"] = phone

return address_fields

0 comments on commit 66a3782

Please sign in to comment.