Skip to content

Commit aeafbd8

Browse files
committed
Edit.
1 parent a344004 commit aeafbd8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

django_mongodb_backend/expressions/builtins.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ def combined_expression(self, compiler, connection):
100100
return connection.ops.combine_expression(self.connector, expressions)
101101

102102

103-
def expression_wrapper_expr(self, compiler, connection):
103+
def expression_wrapper(self, compiler, connection):
104104
return self.expression.as_mql(compiler, connection)
105105

106106

107-
def negated_expression_expr(self, compiler, connection):
108-
return {"$not": expression_wrapper_expr(self, compiler, connection)}
107+
def negated_expression(self, compiler, connection):
108+
return {"$not": expression_wrapper(self, compiler, connection)}
109109

110110

111111
def order_by(self, compiler, connection):
@@ -201,8 +201,8 @@ def exists(self, compiler, connection, get_wrapping_pipeline=None):
201201
return connection.mongo_expr_operators["isnull"](lhs_mql, False)
202202

203203

204-
def when(self, compiler, connection, as_path=False):
205-
return self.condition.as_mql(compiler, connection, as_path=as_path)
204+
def when(self, compiler, connection):
205+
return self.condition.as_mql(compiler, connection)
206206

207207

208208
def value(self, compiler, connection, as_path=False): # noqa: ARG001
@@ -239,8 +239,8 @@ def register_expressions():
239239
CombinedExpression.as_mql_expr = combined_expression
240240
Exists.as_mql_expr = exists
241241
ExpressionList.as_mql = process_lhs
242-
ExpressionWrapper.as_mql_expr = expression_wrapper_expr
243-
NegatedExpression.as_mql_expr = negated_expression_expr
242+
ExpressionWrapper.as_mql_expr = expression_wrapper
243+
NegatedExpression.as_mql_expr = negated_expression
244244
OrderBy.as_mql_expr = order_by
245245
Query.as_mql = query
246246
RawSQL.as_mql = raw_sql
@@ -249,5 +249,5 @@ def register_expressions():
249249
ResolvedOuterRef.as_mql = ResolvedOuterRef.as_sql
250250
Star.as_mql_expr = star
251251
Subquery.as_mql_expr = subquery
252-
When.as_mql = when
252+
When.as_mql_expr = when
253253
Value.as_mql = value

0 commit comments

Comments
 (0)