From 951ff96b2aee03b2b0c4a0c932fef1e42405b753 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 b10a673fa..ebcdfa533 100644 --- a/lib/mobilizon/events/events.ex +++ b/lib/mobilizon/events/events.ex @@ -1860,7 +1860,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