bugfix: fix crash when logged out
This commit is contained in:
parent
2eae10b832
commit
793e714dcd
2 changed files with 9 additions and 7 deletions
|
@ -21,10 +21,12 @@
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if all_tags %}
|
||||||
<i class="fa fa-tags"></i>
|
<i class="fa fa-tags"></i>
|
||||||
{% for tag in all_tags %}
|
{% for tag in all_tags %}
|
||||||
<a href="{{ url_for('.index', tag=tag) }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}
|
<a href="{{ url_for('.index', tag=tag) }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endblock header %}
|
{% endblock header %}
|
||||||
|
|
||||||
|
@ -34,7 +36,7 @@
|
||||||
{% include '_entry.jinja2' with context %}
|
{% include '_entry.jinja2' with context %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if not solo %}
|
{% if entries and not solo %}
|
||||||
<div class="pager">
|
<div class="pager">
|
||||||
<a id="older-link" href="{{ url_for_other_page(page=page+1) }}">Older</a>
|
<a id="older-link" href="{{ url_for_other_page(page=page+1) }}">Older</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,9 +24,9 @@ def index():
|
||||||
entries = []
|
entries = []
|
||||||
ws_topic = None
|
ws_topic = None
|
||||||
solo = False
|
solo = False
|
||||||
|
all_tags = set()
|
||||||
|
|
||||||
if flask_login.current_user.is_authenticated():
|
if flask_login.current_user.is_authenticated():
|
||||||
all_tags = set()
|
|
||||||
for subsc in flask_login.current_user.subscriptions:
|
for subsc in flask_login.current_user.subscriptions:
|
||||||
if subsc.tags:
|
if subsc.tags:
|
||||||
all_tags.update(subsc.tags.split())
|
all_tags.update(subsc.tags.split())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue