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):
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
You can’t perform that action at this time.
0 commit comments