include ongoing events in search
This commit is contained in:
parent
4e218746a8
commit
f071f70d1f
|
@ -1296,7 +1296,12 @@ defmodule Mobilizon.Events do
|
|||
if is_nil(begins_on) do
|
||||
query
|
||||
else
|
||||
where(query, [q], q.begins_on >= ^begins_on)
|
||||
where(
|
||||
query,
|
||||
[q],
|
||||
(not is_nil(q.ends_on) and q.ends_on > ^begins_on) or
|
||||
(is_nil(q.ends_on) and q.begins_on >= ^begins_on)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue