mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-15 10:43:31 +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",
|
||||
"Purchase Taxes and Charges Template",
|
||||
]:
|
||||
frappe.db.sql(
|
||||
f'''delete from `tab{doctype}` where `company`="%s"''' % (company) # nosec
|
||||
)
|
||||
dt = frappe.qb.DocType(doctype)
|
||||
frappe.qb.from_(dt).where(dt.company == company).delete().run()
|
||||
|
||||
|
||||
def set_default_accounts(company):
|
||||
|
||||
Reference in New Issue
Block a user