Add distinct on suggested events

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-10-03 14:37:14 +02:00
parent ca9826e299
commit 4f1465e84d
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -1698,6 +1698,7 @@ defmodule Mobilizon.Events do
event_tags_ids = Enum.map(tags, & &1.id)
Event
|> distinct([e], e.id)
|> join(:left, [e], et in "events_tags", on: e.id == et.event_id)
|> join(:left, [e], a in Address, on: e.physical_address_id == a.id)
|> where(