value_match is now correctly implemented
@@ -152,12 +152,16 @@ class NoneQuery(FieldQuery):
def __init__(self, field, fast=True):
super(NoneQuery, self).__init__(field, None, fast)
+ self.pattern = None
def col_clause(self):
return self.field + " IS NULL", ()
def match(self, item):
- return item.get(self.field, default=None) is None
+ return self.value_match(self.pattern, item.get(self.field, default=None))
+
+ def value_match(self, pattern, value):
+ return value is pattern
def __repr__(self):
return "{0.__class__.__name__}({0.field!r}, {0.fast})".format(self)
