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:
1 parent
53ecc17b57
commit
3bb939d3fe
1 file changed
+2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user