diff --git a/django_mongodb/compiler.py b/django_mongodb/compiler.py index a0508cf5..4424606b 100644 --- a/django_mongodb/compiler.py +++ b/django_mongodb/compiler.py @@ -17,7 +17,6 @@ from django.utils.functional import cached_property from pymongo import ASCENDING, DESCENDING -from .base import Cursor from .query import MongoQuery, wrap_database_errors @@ -692,9 +691,7 @@ def collection_name(self): class SQLDeleteCompiler(compiler.SQLDeleteCompiler, SQLCompiler): def execute_sql(self, result_type=MULTI): - cursor = Cursor() - cursor.rowcount = self.build_query().delete() - return cursor + return self.build_query().delete() def check_query(self): super().check_query()