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:
@@ -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