fix: Use query.run to execute query instead of db.sql
This commit is contained in:
parent
0dac379bc8
commit
08402a76f1
1 changed files with 1 additions and 2 deletions
|
|
@ -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`.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue