]> git.ipfire.org Git - pbs.git/commitdiff
builds: Fix order after grouping
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 Jan 2025 13:51:16 +0000 (13:51 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 Jan 2025 13:51:16 +0000 (13:51 +0000)
It looks like groupby() is sorting the groups before it returns them
which results in our original order being removed. We simply want to
have the most recent build at the top.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/builds/index.html

index a7babe036e546707d94d7cbfd5357cd64babaa44..6a303d249b0cf53f36941186e99ddf23ff5dde38 100644 (file)
@@ -37,7 +37,7 @@
        <section class="section">
                <div class="container">
                        {# Render all builds #}
-                       {% for date, items in builds | groupby("date") %}
+                       {% for date, items in builds | groupby("date") | reverse %}
                                <div class="block">
                                        <h4 class="title is-6">
                                                {{ date | format_day }}