Skip to content

Commit fbb9361

Browse files
committed
editoast: remove duplicate query results using DISTINCT ON (object_id)
Signed-off-by: hamz2a <[email protected]>
1 parent 950a5b1 commit fbb9361

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

editoast/src/models/infra/object_queryable.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl Infra {
5151
)
5252
} else {
5353
format!("
54-
SELECT
54+
SELECT DISTINCT ON (object_table.obj_id)
5555
object_table.obj_id as obj_id,
5656
object_table.data as railjson,
5757
ST_AsGeoJSON(ST_Transform(geographic, 4326))::jsonb as geographic

0 commit comments

Comments
 (0)