Fix events tests with public visibility

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-06-15 09:11:35 +02:00
parent 5f80eecc28
commit 0ea5b27402
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -356,11 +356,12 @@ defmodule Mobilizon.Events do
query = from(e in Event, preload: [:organizer_actor, :participants])
query
|> Page.paginate(page, limit)
|> sort(sort, direction)
|> filter_future_events(is_future)
|> filter_public_visibility()
|> filter_draft()
|> filter_local_or_from_followed_instances_events()
|> Page.paginate(page, limit)
|> Repo.all()
end