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
|
if is_nil(begins_on) do
|
||||||
query
|
query
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user