We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e876eec commit 9c4f7acCopy full SHA for 9c4f7ac
django_mongodb_backend/compiler.py
@@ -17,7 +17,6 @@
17
from django.utils.functional import cached_property
18
from pymongo import ASCENDING, DESCENDING
19
20
-from .base import Cursor
21
from .query import MongoQuery, wrap_database_errors
22
23
@@ -705,15 +704,12 @@ def collection_name(self):
705
704
706
class SQLDeleteCompiler(compiler.SQLDeleteCompiler, SQLCompiler):
707
def execute_sql(self, result_type=MULTI):
708
- cursor = Cursor()
709
try:
710
query = self.build_query()
711
except EmptyResultSet:
712
- rowcount = 0
+ return 0
713
else:
714
- rowcount = query.delete()
715
- cursor.rowcount = rowcount
716
- return cursor
+ return query.delete()
717
718
def check_query(self):
719
super().check_query()
0 commit comments