From df335cf48e00b7ca4aa34c2ffa563de66b9f4377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?X=C3=A9fir=20Destiny?= Date: Sun, 15 Dec 2019 19:06:37 +0100 Subject: [PATCH] Fix folder id --- app.py | 1 + templates/admin/edit.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 506b933..4b4bd54 100644 --- a/app.py +++ b/app.py @@ -145,6 +145,7 @@ def admin_edit(link_id=None): if link_id: link = AnimeLink.query.filter_by(id=link_id).first() + form.folder.data = link.title.folder.id else: link = AnimeLink() for attr in dir(link): diff --git a/templates/admin/edit.html b/templates/admin/edit.html index 06880b7..af96e40 100644 --- a/templates/admin/edit.html +++ b/templates/admin/edit.html @@ -10,7 +10,7 @@
- {{ action_form.folder(value=link.title.folder.id) }} + {{ action_form.folder }}