fix: ignore unsupported methods while resyncing (#28210) (#28214)

(cherry picked from commit 72a050fb0b)

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
mergify[bot]
2021-11-03 09:47:00 +05:30
committed by GitHub
parent fa5cee479f
commit 94905df774

View File

@@ -68,5 +68,8 @@ def dump_request_data(data, event="create/order"):
@frappe.whitelist()
def resync(method, name, request_data):
frappe.db.set_value("Shopify Log", name, "status", "Queued", update_modified=False)
if not method.startswith("erpnext.erpnext_integrations.connectors.shopify_connection"):
return
frappe.enqueue(method=method, queue='short', timeout=300, is_async=True,
**{"order": json.loads(request_data), "request_id": name})