match method converted to instance method

This commit is contained in:
Adam Jakab 2020-03-15 12:52:12 +01:00
parent 99a3343c0c
commit 8988d908c5

View file

@ -156,10 +156,9 @@ class NoneQuery(FieldQuery):
def col_clause(self):
return self.field + " IS NULL", ()
@classmethod
def match(cls, item):
def match(self, item):
try:
return item[cls.field] is None
return item.get(self.field) is None
except KeyError:
return True