This commit is contained in:
j 2016-01-04 15:55:18 +05:30
parent 294ea33960
commit 5e2410712e

View file

@ -113,7 +113,7 @@ class Item(db.Model):
if key not in self.meta and key in j: if key not in self.meta and key in j:
del j[key] del j[key]
if keys: if keys:
for k in list(j.keys()): for k in list(j):
if k not in keys: if k not in keys:
del j[k] del j[k]
return j return j
@ -253,7 +253,7 @@ class Item(db.Model):
record[key] = data[key] record[key] = data[key]
self.meta[key] = data[key] self.meta[key] = data[key]
update = True update = True
for key in list(self.meta.keys()): for key in list(self.meta):
if key not in self.meta_keys: if key not in self.meta_keys:
del self.meta[key] del self.meta[key]
update = True update = True