only migrate if user exists
This commit is contained in:
parent
d3aab286f8
commit
529a01269d
1 changed files with 10 additions and 9 deletions
|
@ -248,6 +248,7 @@ def upgrade_db(old, new=None):
|
|||
if old <= '20160106-497-c86ba8a':
|
||||
with db.session() as session:
|
||||
u = User.get(settings.USER_ID)
|
||||
if u:
|
||||
l = u.library
|
||||
for i in u.items.all():
|
||||
if not i in l.items:
|
||||
|
|
Loading…
Reference in a new issue