def get_item_list(): try: return get_shopify_items() except (requests.exceptions.HTTPError, ShopifyError) as e: frappe.throw( _("Something went wrong: {0}").format(frappe.get_traceback()), ShopifyError)
def sync_shopify_items(warehouse): for item in get_shopify_items(): make_item(warehouse, item)
def sync_shopify_items(warehouse): for item in get_shopify_items(): if not frappe.db.get_value("Item", {"shopify_id": item.get("id")}, "name"): make_item(warehouse, item)
def get_item_list(): try: return get_shopify_items() except (requests.exceptions.HTTPError, ShopifyError) as e: frappe.throw(_("Something went wrong: {0}").format(frappe.get_traceback()), ShopifyError)
def sync_shopify_items(warehouse): shopify_items = get_shopify_items() # 268 for item in shopify_items: make_item(warehouse, item)