Skip to content
Snippets Groups Projects
Commit 4a164e62 authored by grollicus's avatar grollicus
Browse files

cleaned up first_now_done

parent e971eb26
Branches
Tags
No related merge requests found
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
{% if events %} {% if events %}
<ul class="list-unstyled d-flex flex-column gap-3 mb-0"> <ul class="list-unstyled d-flex flex-column gap-3 mb-0">
{# using a list here to be able to set a value in the nested block #} {# using a list here to be able to set a value in the nested block #}
{% set first_now_done = [] %} {% set ns = namespace(first_now_done=false) %}
{% for event in events %} {% for event in events %}
{% if event.schedule_end < now %} {% if event.schedule_end < now %}
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
scheduled=true if event.id | safe in my_scheduled_events, scheduled=true if event.id | safe in my_scheduled_events,
first=loop.first, first=loop.first,
event_when=event_when, event_when=event_when,
first_now=true if event_when == 'now' and not first_now_done[0] first_now=true if event_when == 'now' and not ns.first_now_done
) }} ) }}
{% if when == 'now' and not first_now_done[0] %} {% if event_when == 'now' %}
{% set ignore = first_now_done.append(True) %} {% set ns.first_now_done = true %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment