avoid one commit

This commit is contained in:
j 2016-01-11 19:59:28 +05:30
parent fc11869088
commit 8fa5d10122

View file

@ -350,6 +350,8 @@ class Item(db.Model):
for key in self.meta_keys:
if key not in self.meta and key in self.info:
self.meta[key] = self.info[key]
del self.info[key]
#FIXME get from user_meta
if state.online:
if 'isbn' in self.meta:
@ -418,7 +420,6 @@ class Item(db.Model):
self.users.remove(user)
for l in self.lists.filter_by(user_id=user.id):
l.items.remove(self)
state.db.session.commit()
if not self.users:
self.delete()
else: