From 793e714dcd17d08d9bcd5e26d1593b63fcdbc0a7 Mon Sep 17 00:00:00 2001 From: Kyle Mahan Date: Tue, 21 Apr 2015 05:13:16 +0000 Subject: [PATCH] bugfix: fix crash when logged out --- woodwind/templates/feed.jinja2 | 12 +++++++----- woodwind/views.py | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/woodwind/templates/feed.jinja2 b/woodwind/templates/feed.jinja2 index e3f4565..23eaca6 100644 --- a/woodwind/templates/feed.jinja2 +++ b/woodwind/templates/feed.jinja2 @@ -21,10 +21,12 @@ {% endif %} - - {% for tag in all_tags %} - {{ tag }}{% if not loop.last %}, {% endif %} - {% endfor %} + {% if all_tags %} + + {% for tag in all_tags %} + {{ tag }}{% if not loop.last %}, {% endif %} + {% endfor %} + {% endif %} {% endblock header %} @@ -34,7 +36,7 @@ {% include '_entry.jinja2' with context %} {% endfor %} - {% if not solo %} + {% if entries and not solo %}
Older
diff --git a/woodwind/views.py b/woodwind/views.py index cb0b58c..4e391c1 100644 --- a/woodwind/views.py +++ b/woodwind/views.py @@ -24,9 +24,9 @@ def index(): entries = [] ws_topic = None solo = False - + all_tags = set() + if flask_login.current_user.is_authenticated(): - all_tags = set() for subsc in flask_login.current_user.subscriptions: if subsc.tags: all_tags.update(subsc.tags.split())