From d52dede612fdda408cc0ab525cc623ca2661c2b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Fri, 3 Nov 2017 17:55:11 +0100 Subject: [PATCH] Fix SQL query for tag to include button name --- soundboard.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/soundboard.py b/soundboard.py index f104b1b..8e365b8 100644 --- a/soundboard.py +++ b/soundboard.py @@ -109,9 +109,16 @@ LEFT OUTER JOIN ( button_tags ON fk_tag = tag.id - WHERE fk_button = 1 + WHERE fk_button = ( + SELECT + button.id + FROM + button + WHERE + button.file = ? + ) ) AS checked -ON tag.id = checked.id""") +ON tag.id = checked.id""", (sound,)) print(tags) return render_template("edit.html", sound=sound, tags=tags)