Fix crash on delete (2)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7b11eeffef
commit
3a38f7ed6d
@ -108,13 +108,9 @@ def list_animes(url_filters='nyaa,yggtorrent'):
|
|||||||
|
|
||||||
def remove_garbage(link):
|
def remove_garbage(link):
|
||||||
title = link.title
|
title = link.title
|
||||||
if title:
|
if title and not len(title.links):
|
||||||
if not len(title.links):
|
db.session.delete(title)
|
||||||
db.session.delete(title)
|
db.session.commit()
|
||||||
db.session.commit()
|
|
||||||
if not len(title.folder.titles):
|
|
||||||
db.session.delete(title.folder)
|
|
||||||
db.session.commit()
|
|
||||||
|
|
||||||
|
|
||||||
@app.route('/admin', methods=['GET', 'POST'])
|
@app.route('/admin', methods=['GET', 'POST'])
|
||||||
|
Reference in New Issue
Block a user