From d2af20dd59ecdf8dbedc07f9e0db96e5ba472763 Mon Sep 17 00:00:00 2001 From: 778a69cd <778a69cd@potsda.mn> Date: Tue, 21 Mar 2023 13:53:49 +0100 Subject: [PATCH] show events until their end time, unless they have no end time --- lib/mobilizon/events/events.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mobilizon/events/events.ex b/lib/mobilizon/events/events.ex index aedc9d394..e0f05cfc5 100644 --- a/lib/mobilizon/events/events.ex +++ b/lib/mobilizon/events/events.ex @@ -1811,7 +1811,7 @@ defmodule Mobilizon.Events do @spec filter_future_events(Ecto.Queryable.t(), boolean) :: Ecto.Query.t() defp filter_future_events(query, true) do from(q in query, - where: q.begins_on > ^DateTime.utc_now() + where: coalesce(q.ends_on, q.begins_on) > ^DateTime.utc_now() ) end