Fix crash on delete
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michel Roux 2020-09-29 17:21:44 +02:00
parent 07a69f24fb
commit 7b11eeffef

View File

@ -128,8 +128,8 @@ def admin():
if link: if link:
db.session.delete(link) db.session.delete(link)
db.session.commit() db.session.commit()
remove_garbage(link)
form.message = '%s (%s) has been successfully deleted' % (link.title.name, link.season) form.message = '%s (%s) has been successfully deleted' % (link.title.name, link.season)
remove_garbage(link)
else: else:
form._errors = {'id': ['Id %s was not found in the database' % form.id.data]} form._errors = {'id': ['Id %s was not found in the database' % form.id.data]}