Merge branch 'master' into renovate/dateparser-1.x
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Michel Roux 2022-03-19 09:29:30 +00:00
commit d55d58a3c2

View File

@ -137,7 +137,7 @@ def admin():
form = DeleteForm(request.form) form = DeleteForm(request.form)
if form.validate_on_submit(): if form.validate_on_submit():
link = AnimeLink.query.filter_by(id=form.id.data).first() link = AnimeLink.query.filter_by(id=int(form.id.data)).first()
if link: if link:
form.message = '%s (%s) has been successfully deleted' % ( form.message = '%s (%s) has been successfully deleted' % (
link.title.name, link.title.name,
@ -171,7 +171,7 @@ def folder_list():
form = FolderDeleteForm(request.form) form = FolderDeleteForm(request.form)
if form.validate_on_submit(): if form.validate_on_submit():
folder = AnimeFolder.query.filter_by(id=form.id.data).first() folder = AnimeFolder.query.filter_by(id=int(form.id.data)).first()
if folder: if folder:
form.message = '%s has been successfully deleted' % folder.name form.message = '%s has been successfully deleted' % folder.name
db.session.delete(folder) db.session.delete(folder)