Skip to content

Commit

Permalink
fix: shopify sync issue without customer
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure committed Jan 19, 2024
1 parent 1480e7a commit 8d41768
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ecommerce_integrations/shopify/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ def create_order(order, setting, company=None):

def create_sales_order(shopify_order, setting, company=None):
customer = setting.default_customer
if customer_id := shopify_order.get("customer", {}).get("id"):
customer = frappe.db.get_value("Customer", {CUSTOMER_ID_FIELD: customer_id}, "name")
if shopify_order.get("customer", {}):
if customer_id := shopify_order.get("customer", {}).get("id"):
customer = frappe.db.get_value("Customer", {CUSTOMER_ID_FIELD: customer_id}, "name")

so = frappe.db.get_value("Sales Order", {ORDER_ID_FIELD: shopify_order.get("id")}, "name")

Expand Down

0 comments on commit 8d41768

Please sign in to comment.