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
1 changed files with 1 additions and 0 deletions

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(