diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index 8e414ec6..0629957a 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -73,6 +73,7 @@ jobs: model_fields.test_decimalfield model_fields.test_charfield model_fields.test_floatfield + model_fields.test_integerfield model_fields.test_textfield model_fields.test_uuid or_lookups diff --git a/django_mongodb/features.py b/django_mongodb/features.py index 3cfe806f..62fe4aaa 100644 --- a/django_mongodb/features.py +++ b/django_mongodb/features.py @@ -47,4 +47,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): "model_fields.test_uuid.TestQuerying.test_istartswith", "model_fields.test_uuid.TestQuerying.test_startswith", }, + "QuerySet.update() with expression not supported.": { + "model_fields.test_integerfield.PositiveIntegerFieldTests.test_negative_values", + }, } diff --git a/django_mongodb/query.py b/django_mongodb/query.py index f7271435..8d2fdecd 100644 --- a/django_mongodb/query.py +++ b/django_mongodb/query.py @@ -1,6 +1,7 @@ import re from functools import wraps +from django.core.exceptions import FullResultSet from django.db import DatabaseError, IntegrityError, NotSupportedError from django.db.models.lookups import UUIDTextMixin from django.db.models.query import QuerySet @@ -174,7 +175,10 @@ def add_filters(self, filters, query=None): continue - field, lookup_type, value = self._decode_child(child) + try: + field, lookup_type, value = self._decode_child(child) + except FullResultSet: + continue if lookup_type in ("month", "day"): raise DatabaseError("MongoDB does not support month/day queries.")