Skip to content

Commit 8a8b441

Browse files
committed
rename parameter.
1 parent 8572489 commit 8a8b441

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

django_mongodb_backend/base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,16 @@ class DatabaseWrapper(BaseDatabaseWrapper):
9898
}
9999
_connection_pools = {}
100100

101-
def _isnull_operator_expr(field, null):
102-
is_null = {
101+
def _isnull_operator_expr(field, is_null):
102+
is_null_expr = {
103103
"$or": [
104104
# The path does not exist (i.e. is "missing")
105105
{"$eq": [{"$type": field}, "missing"]},
106106
# or the value is None.
107107
{"$eq": [field, None]},
108108
]
109109
}
110-
return is_null if null else {"$not": is_null}
110+
return is_null_expr if is_null else {"$not": is_null_expr}
111111

112112
mongo_expr_operators = {
113113
"exact": lambda a, b: {"$eq": [a, b]},
@@ -158,8 +158,8 @@ def range_match(a, b):
158158
raise EmptyResultSet
159159
return {"$and": conditions}
160160

161-
def _isnull_operator_match(field, null):
162-
if null:
161+
def _isnull_operator_match(field, is_null):
162+
if is_null:
163163
return {"$or": [{field: {"$exists": False}}, {field: None}]}
164164
return {"$and": [{field: {"$exists": True}}, {field: {"$ne": None}}]}
165165

0 commit comments

Comments
 (0)