From 5fb5897c34afd088c7a3d9be1792ac1cb102c730 Mon Sep 17 00:00:00 2001 From: summersamara Date: Tue, 19 Dec 2023 23:55:34 +0100 Subject: [PATCH] Fix: order the fetched events for the ICS feed DESC by "beings_on" https://git.potsda.mn/potsda.mn/mobilizon/issues/37 --- lib/mobilizon/events/events.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mobilizon/events/events.ex b/lib/mobilizon/events/events.ex index 8796ae442..9fa01246f 100644 --- a/lib/mobilizon/events/events.ex +++ b/lib/mobilizon/events/events.ex @@ -394,7 +394,8 @@ defmodule Mobilizon.Events do |> filter_draft() |> filter_local() |> preload_for_event() - |> Page.build_page(page, limit) + |> order_by(desc: :begins_on) + |> Page.build_page(page, limit, :begins_on) end @doc """