Skip to content

Commit

Permalink
fix: condition to fetch E Commerce Settings fields (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure authored Oct 16, 2023
1 parent 4f77ff1 commit a1f923a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webshop/setup/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
)

Expand Down

0 comments on commit a1f923a

Please sign in to comment.