From cba5de45b6d6e18652b2acf28909581e6d039265 Mon Sep 17 00:00:00 2001 From: Carmine Di Monaco Date: Tue, 14 Dec 2021 18:06:50 +0100 Subject: [PATCH] Add distinct to RouteSelect query in order to avoid duplicate results Co-Authored-By: David Costa --- find/route_select.go | 1 + 1 file changed, 1 insertion(+) diff --git a/find/route_select.go b/find/route_select.go index 1f139a1e..526dac2d 100644 --- a/find/route_select.go +++ b/find/route_select.go @@ -26,6 +26,7 @@ func RouteSelect(limit *int, after *int, ids []int, active bool, where *model.Ro "feed_versions.sha1 AS feed_version_sha1", "tl_route_onestop_ids.onestop_id", ). + Distinct(). From("gtfs_routes"). Join("feed_versions ON feed_versions.id = gtfs_routes.feed_version_id"). Join("current_feeds ON current_feeds.id = feed_versions.feed_id").