fix rename user

This commit is contained in:
j 2019-01-17 14:50:48 +05:30
parent 608c9ea696
commit 5ad4d1d67c
1 changed files with 2 additions and 2 deletions

View File

@ -307,7 +307,7 @@ class List(db.Model):
@classmethod
def rename_user(cls, old, new):
for l in cls.query.filter(cls._query is not None):
for l in cls.query.filter(cls._query != None):
def update_conditions(conditions):
changed = False
@ -320,7 +320,7 @@ class List(db.Model):
changed = True
return changed
if update_conditions(l._query.get('conditions', [])):
if l._query and update_conditions(l._query.get('conditions', [])):
l.save()
def add_items(self, items, commit=True):