From c9ec0aad8abb977a0be3750dd4efc456797cf1cb Mon Sep 17 00:00:00 2001 From: Ross Mountjoy Date: Thu, 19 Mar 2020 19:38:15 -0400 Subject: [PATCH] fixed critical bug with the tags --- dashmachine/sources.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dashmachine/sources.py b/dashmachine/sources.py index 4522931..9c8152e 100644 --- a/dashmachine/sources.py +++ b/dashmachine/sources.py @@ -86,8 +86,11 @@ def context_processor(): tags += app_db.tags.split(",") tags_form = TagsForm() + tags = [tag.strip() for tag in tags] + for tag in tags: + if tags.count(tag) > 1: + tags.remove(tag) tags_form.tags.choices += [(tag, tag) for tag in tags] - print(tags_form.tags.choices) settings = Settings.query.first() if settings.background == "random": if len(os.listdir(backgrounds_images_folder)) < 1: