Merge pull request #426 from ortgit/issue/1919

Check whether memdb record is None before trying to read its keys
This commit is contained in:
mdipierro
2014-04-15 09:48:32 -05:00
+2
View File
@@ -294,6 +294,8 @@ class Table(DALStorage):
def __call__(self, id, **kwargs):
record = self.get(id)
if record is None:
return None
if kwargs and any(record[key]!=kwargs[key] for key in kwargs):
return None
return record