avoid one commit
This commit is contained in:
parent
fc11869088
commit
8fa5d10122
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue