mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 00:25:01 +00:00
fix: use query builder instead of raw SQL in unset_existing_data
(cherry picked from commit 7fa4ed6139)
This commit is contained in:
@@ -448,9 +448,8 @@ def unset_existing_data(company):
|
|||||||
"Sales Taxes and Charges Template",
|
"Sales Taxes and Charges Template",
|
||||||
"Purchase Taxes and Charges Template",
|
"Purchase Taxes and Charges Template",
|
||||||
]:
|
]:
|
||||||
frappe.db.sql(
|
dt = frappe.qb.DocType(doctype)
|
||||||
f'''delete from `tab{doctype}` where `company`="%s"''' % (company) # nosec
|
frappe.qb.from_(dt).where(dt.company == company).delete().run()
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def set_default_accounts(company):
|
def set_default_accounts(company):
|
||||||
|
|||||||
Reference in New Issue
Block a user