Skip to content
Snippets Groups Projects
Verified Commit 45d9023b authored by ornanovitch's avatar ornanovitch
Browse files

fix: timeline macro sorting

parent 707fc419
No related branches found
No related tags found
1 merge request!60Resolve "timeline : ordre incohérent"
Pipeline #26308 passed
......@@ -3,7 +3,7 @@
{% macro timeline(events, public_only=True) %}
<div class="timeline">
{% set dates = [] %}
{% for event in events | reverse %}
{% for event in events | sort(attribute='created_at', reverse=True) %}
{% if event.public or not public_only %}
{% if not event.created_at.date() == dates[-1] %}
{% set _ = dates.append(event.created_at.date()) %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment