fix rename user
This commit is contained in:
parent
608c9ea696
commit
5ad4d1d67c
1 changed files with 2 additions and 2 deletions
|
@ -307,7 +307,7 @@ class List(db.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def rename_user(cls, old, new):
|
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):
|
def update_conditions(conditions):
|
||||||
changed = False
|
changed = False
|
||||||
|
@ -320,7 +320,7 @@ class List(db.Model):
|
||||||
changed = True
|
changed = True
|
||||||
return changed
|
return changed
|
||||||
|
|
||||||
if update_conditions(l._query.get('conditions', [])):
|
if l._query and update_conditions(l._query.get('conditions', [])):
|
||||||
l.save()
|
l.save()
|
||||||
|
|
||||||
def add_items(self, items, commit=True):
|
def add_items(self, items, commit=True):
|
||||||
|
|
Loading…
Reference in a new issue