Fix duplicate events on homepage

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-10-01 17:51:07 +02:00
parent 32ff3cb69b
commit e068326c4b
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 1 additions and 1 deletions

View File

@ -356,7 +356,7 @@ defmodule Mobilizon.Events do
direction \\ :asc,
is_future \\ true
) do
query = from(e in Event, preload: [:organizer_actor, :participants])
query = from(e in Event, distinct: true, preload: [:organizer_actor, :participants])
query
|> sort(sort, direction)