Skip to content

Commit eeda4c8

Browse files
committed
Fix nothing node.
1 parent b0068d4 commit eeda4c8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

django_mongodb_backend/lookups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ def register_lookups():
151151
FieldGetDbPrepValueIterableMixin.resolve_expression_parameter = (
152152
field_resolve_expression_parameter
153153
)
154-
In.as_mql_path = RelatedIn.as_mql_path = wrap_in(builtin_lookup_path)
155154
In.as_mql_expr = RelatedIn.as_mql_expr = wrap_in(builtin_lookup_expr)
155+
In.as_mql_path = RelatedIn.as_mql_path = wrap_in(builtin_lookup_path)
156156
In.get_subquery_wrapping_pipeline = get_subquery_wrapping_pipeline
157-
IsNull.as_mql_path = is_null_path
158157
IsNull.as_mql_expr = is_null_expr
158+
IsNull.as_mql_path = is_null_path
159159
Lookup.can_use_path = can_use_path
160160
PatternLookup.prep_lookup_value_mongo = pattern_lookup_prep_lookup_value
161161
# Patching the main method, it is not supported yet.

django_mongodb_backend/query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,12 @@ def where_node(self, compiler, connection, as_path=False):
336336
return mql
337337

338338

339-
def nothing_node(self, compiler, connection):
339+
def nothing_node(self, compiler, connection, as_path=None): # noqa: ARG001
340340
return self.as_sql(compiler, connection)
341341

342342

343343
def register_nodes():
344344
ExtraWhere.as_mql = extra_where
345345
Join.as_mql = join
346-
NothingNode.as_mql_expr = nothing_node
346+
NothingNode.as_mql = nothing_node
347347
WhereNode.as_mql = where_node

0 commit comments

Comments
 (0)