fixed another critical bug with the tags

This commit is contained in:
Ross Mountjoy 2020-03-20 09:09:25 -04:00
parent fddd5f8e79
commit 3bd607a33d

View File

@ -83,9 +83,11 @@ def context_processor():
app_db.groups = None app_db.groups = None
if check_groups(app_db.groups, current_user): if check_groups(app_db.groups, current_user):
apps.append(app_db) apps.append(app_db)
if app_db.tags:
tags += app_db.tags.split(",") tags += app_db.tags.split(",")
tags_form = TagsForm() tags_form = TagsForm()
if len(tags) > 0:
tags = [tag.strip() for tag in tags] tags = [tag.strip() for tag in tags]
tags = list(dict.fromkeys(tags)) tags = list(dict.fromkeys(tags))
tags_form.tags.choices += [(tag, tag) for tag in tags] tags_form.tags.choices += [(tag, tag) for tag in tags]