From 08402a76f162152d91be2fb0900f3685f460d43c Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Tue, 19 Apr 2022 19:06:43 +0530 Subject: [PATCH] fix: Use query.run to execute query instead of db.sql --- frappe/database/database.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frappe/database/database.py b/frappe/database/database.py index 949f619a8d..ac0d7e51fc 100644 --- a/frappe/database/database.py +++ b/frappe/database/database.py @@ -1174,12 +1174,11 @@ class Database(object): Doctype name can be passed directly, it will be pre-pended with `tab`. """ - values = () filters = filters or kwargs.get("conditions") query = self.query.build_conditions(table=doctype, filters=filters).delete() if "debug" not in kwargs: kwargs["debug"] = debug - return self.sql(query, values, **kwargs) + return query.run(**kwargs) def truncate(self, doctype: str): """Truncate a table in the database. This runs a DDL command `TRUNCATE TABLE`.