mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-27 18:31:07 +00:00
Currently happening events are not future events
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
503616fa60
commit
c4cdfd9857
1 changed files with 1 additions and 2 deletions
|
@ -1506,11 +1506,10 @@ defmodule Mobilizon.Events do
|
|||
from(e in query, where: e.draft == ^is_draft)
|
||||
end
|
||||
|
||||
# Currently happening events are also future events
|
||||
@spec filter_future_events(Ecto.Query.t(), boolean) :: Ecto.Query.t()
|
||||
defp filter_future_events(query, true) do
|
||||
from(q in query,
|
||||
where: q.begins_on > ^DateTime.utc_now() or q.ends_on > ^DateTime.utc_now()
|
||||
where: q.begins_on > ^DateTime.utc_now()
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue