get rid of Public lists

This commit is contained in:
j 2019-02-02 17:53:45 +05:30
commit 5f36b2eab4
3 changed files with 18 additions and 2 deletions

View file

@ -368,7 +368,7 @@ class List(db.Model):
q = list_items.delete().where(list_items.columns['list_id'].is_(self.id))
state.db.session.execute(q)
if not self._query:
if self.user_id == settings.USER_ID and self.name != '':
if self.user_id == settings.USER_ID and self.name not in ('', 'Inbox'):
add_record('removelist', self.name)
state.db.session.delete(self)
if commit: