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>
|
||||
{% endif %}
|
||||
|
||||
<i class="fa fa-tags"></i>
|
||||
{% for tag in all_tags %}
|
||||
<a href="{{ url_for('.index', tag=tag) }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
{% if all_tags %}
|
||||
<i class="fa fa-tags"></i>
|
||||
{% for tag in all_tags %}
|
||||
<a href="{{ url_for('.index', tag=tag) }}">{{ tag }}</a>{% 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 %}
|
||||
<div class="pager">
|
||||
<a id="older-link" href="{{ url_for_other_page(page=page+1) }}">Older</a>
|
||||
</div>
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue