Fix SQL query for tag to include button name

This commit is contained in:
Martin Müller 2017-11-03 17:55:11 +01:00
parent 03be396c87
commit d52dede612

View File

@ -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)