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`.