Fix title
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michel Roux 2021-07-10 23:45:48 +02:00
parent 323930982f
commit 1073d2c1ea

View File

@ -211,7 +211,8 @@ def admin_edit(link_id=None):
instance = get_instance(form.link.data) instance = get_instance(form.link.data)
# Title # Title
title = AnimeTitle.query.filter_by(name=form.name.data).first() title = AnimeTitle.query.filter_by(id=link.title_id).first()
title = title if title else AnimeTitle.query.filter_by(name=form.name.data).first()
title = title if title else AnimeTitle() title = title if title else AnimeTitle()
title.folder_id = form.folder.data title.folder_id = form.folder.data
title.name = form.name.data title.name = form.name.data