File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -98,16 +98,16 @@ class DatabaseWrapper(BaseDatabaseWrapper):
98
98
}
99
99
_connection_pools = {}
100
100
101
- def _isnull_operator_expr (field , null ):
102
- is_null = {
101
+ def _isnull_operator_expr (field , is_null ):
102
+ is_null_expr = {
103
103
"$or" : [
104
104
# The path does not exist (i.e. is "missing")
105
105
{"$eq" : [{"$type" : field }, "missing" ]},
106
106
# or the value is None.
107
107
{"$eq" : [field , None ]},
108
108
]
109
109
}
110
- return is_null if null else {"$not" : is_null }
110
+ return is_null_expr if is_null else {"$not" : is_null_expr }
111
111
112
112
mongo_expr_operators = {
113
113
"exact" : lambda a , b : {"$eq" : [a , b ]},
@@ -158,8 +158,8 @@ def range_match(a, b):
158
158
raise EmptyResultSet
159
159
return {"$and" : conditions }
160
160
161
- def _isnull_operator_match (field , null ):
162
- if null :
161
+ def _isnull_operator_match (field , is_null ):
162
+ if is_null :
163
163
return {"$or" : [{field : {"$exists" : False }}, {field : None }]}
164
164
return {"$and" : [{field : {"$exists" : True }}, {field : {"$ne" : None }}]}
165
165
You can’t perform that action at this time.
0 commit comments