Check for clauses and filters in delete

Guard against wrong API use before dropping all data
This commit is contained in:
Stefan Wehrmeyer
2017-05-16 16:57:07 +02:00
parent 5fd8b3ef3e
commit 3f330df20f
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ class Table(object):
If no arguments are given, all records are deleted.
"""
self._check_dropped()
if _filter:
if _filter or _clauses:
q = self._args_to_clause(_filter, clauses=_clauses)
stmt = self.table.delete(q)
else: