fix: converted query to qb
This commit is contained in:
@@ -2,9 +2,9 @@ import frappe
|
|||||||
|
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
rows = frappe.db.sql(
|
table = frappe.qb.DocType("Singles")
|
||||||
"select field from `tabSingles` where doctype='User'", as_dict=True
|
q = frappe.qb.from_(table).select(table.field).where(table.doctype == "User")
|
||||||
)
|
rows = q.run()
|
||||||
|
|
||||||
if len(rows):
|
if len(rows):
|
||||||
frappe.db.sql("delete from `tabSingles` where doctype='User'")
|
frappe.db.delete("Singles", {"doctype": "User"})
|
||||||
|
|||||||
Reference in New Issue
Block a user