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)