Skip to content

Commit 457d428

Browse files
committed
Revert in_.
1 parent 90629b7 commit 457d428

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

django_mongodb/lookups.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
from django.core.exceptions import EmptyResultSet, FullResultSet
21
from django.db import NotSupportedError
3-
from django.db.models.expressions import Value
42
from django.db.models.fields.related_lookups import In, MultiColSource, RelatedIn
53
from django.db.models.lookups import (
64
BuiltinLookup,
@@ -50,14 +48,6 @@ def in_(self, compiler, connection):
5048
def is_null(self, compiler, connection):
5149
if not isinstance(self.rhs, bool):
5250
raise ValueError("The QuerySet value for an isnull lookup must be True or False.")
53-
if isinstance(self.lhs, Value):
54-
if self.lhs.value is None or (
55-
self.lhs.value == "" and connection.features.interprets_empty_strings_as_nulls
56-
):
57-
result_exception = FullResultSet if self.rhs else EmptyResultSet
58-
else:
59-
result_exception = EmptyResultSet if self.rhs else FullResultSet
60-
raise result_exception
6151
lhs_mql = process_lhs(self, compiler, connection)
6252
return connection.mongo_operators["isnull"](lhs_mql, self.rhs)
6353

0 commit comments

Comments
 (0)