show events until their end time, unless they have no end time

This commit is contained in:
johndoe4 2023-05-27 09:23:42 +02:00
parent 609740f931
commit 3f03e320d1

View file

@ -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: coalesce(q.ends_on, q.begins_on) > ^DateTime.utc_now()
where: coalesce(q.ends_on, q.begins_on) > ^DateTime.utc_now()
)
end