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,11 +83,13 @@ def context_processor():
app_db.groups = None
if check_groups(app_db.groups, current_user):
apps.append(app_db)
tags += app_db.tags.split(",")
if app_db.tags:
tags += app_db.tags.split(",")
tags_form = TagsForm()
tags = [tag.strip() for tag in tags]
tags = list(dict.fromkeys(tags))
if len(tags) > 0:
tags = [tag.strip() for tag in tags]
tags = list(dict.fromkeys(tags))
tags_form.tags.choices += [(tag, tag) for tag in tags]
settings = Settings.query.first()
if settings.background == "random":