update models.py

This commit is contained in:
Rolux 2016-01-05 20:13:00 +05:30
parent a6f34a0e3a
commit 043abbd27c

View file

@ -116,6 +116,9 @@ class Item(db.Model):
for k in list(j):
if k not in keys:
del j[k]
for key in [k['id'] for k in settings.config['itemKeys'] if isinstance(k['type'], list)]:
if key in j and not isinstance(j[key], list):
j[key] = [j[key]]
return j
def get_path(self):