From 5d0cbcd0e37477b7edbab32b5ad07c8e5db0cfb2 Mon Sep 17 00:00:00 2001 From: Ross Mountjoy Date: Thu, 19 Mar 2020 19:54:31 -0400 Subject: [PATCH] fixed critical bug with the tags --- dashmachine/sources.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dashmachine/sources.py b/dashmachine/sources.py index 9c8152e..1578772 100644 --- a/dashmachine/sources.py +++ b/dashmachine/sources.py @@ -87,9 +87,7 @@ def context_processor(): tags_form = TagsForm() tags = [tag.strip() for tag in tags] - for tag in tags: - if tags.count(tag) > 1: - tags.remove(tag) + tags = list(dict.fromkeys(tags)) tags_form.tags.choices += [(tag, tag) for tag in tags] settings = Settings.query.first() if settings.background == "random":