Check whether record is None before trying to read its keys otherwise app crashes on GAE (and other memdb's)

This commit is contained in:
ortgit
2014-04-14 01:55:30 -04:00
parent 53ecc17b57
commit 3bb939d3fe
+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