don't record addlistitems for Inbox

This commit is contained in:
j 2019-02-02 17:36:28 +05:30
parent 431dc8e194
commit 9d11bbba53
2 changed files with 2 additions and 2 deletions

View file

@ -538,7 +538,7 @@ class Item(db.Model):
add_record('additem', self.id, f.info) add_record('additem', self.id, f.info)
add_record('edititem', self.id, self.meta) add_record('edititem', self.id, self.meta)
for l in self.lists.filter_by(user_id=settings.USER_ID): for l in self.lists.filter_by(user_id=settings.USER_ID):
if l.name != '': if l.name != '' and l.name != 'Inbox':
add_record('addlistitems', l.name, [self.id]) add_record('addlistitems', l.name, [self.id])
self.update() self.update()
f.move() f.move()

View file

@ -339,7 +339,7 @@ class List(db.Model):
state.db.session.add(self) state.db.session.add(self)
if commit: if commit:
state.db.session.commit() state.db.session.commit()
if self.user_id == settings.USER_ID and self.name != '' and available_items: if self.user_id == settings.USER_ID and self.name not in ('', 'Inbox') and available_items:
add_record('addlistitems', self.name, available_items) add_record('addlistitems', self.name, available_items)
def get_items(self): def get_items(self):