From a1f923abf43077beb5099e14c32048610f37530a Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 16 Oct 2023 16:18:46 +0530 Subject: [PATCH] fix: condition to fetch E Commerce Settings fields (#25) --- webshop/setup/install.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webshop/setup/install.py b/webshop/setup/install.py index 5bf90cfb16..3d3d5c45cd 100644 --- a/webshop/setup/install.py +++ b/webshop/setup/install.py @@ -19,6 +19,8 @@ def copy_from_ecommerce_settings(): if not has_ecommerce_fields(): return + frappe.reload_doc("webshop", "doctype", "webshop_settings") + qb = frappe.qb table = frappe.qb.Table("tabSingles") old_doctype = "E Commerce Settings" @@ -27,7 +29,7 @@ def copy_from_ecommerce_settings(): entries = ( qb.from_(table) .select(table.field, table.value) - .where(table.doctype == old_doctype) + .where((table.doctype == old_doctype) & (table.field != "name")) .run(as_dict=True) )