diff --git a/stationapi/src/infrastructure/station_repository.rs b/stationapi/src/infrastructure/station_repository.rs index 53d3da01..5ecfb6b9 100644 --- a/stationapi/src/infrastructure/station_repository.rs +++ b/stationapi/src/infrastructure/station_repository.rs @@ -1343,7 +1343,7 @@ impl InternalStationRepository { COALESCE(l.average_distance, 0.0)::DOUBLE PRECISION AS average_distance, NULL::int AS sst_id, NULL::int AS type_cd, - NULL::int AS line_group_cd, + (SELECT sst.line_group_cd FROM station_station_types sst WHERE sst.station_cd = s.station_cd AND sst.line_group_cd IS NOT NULL LIMIT 1)::int AS line_group_cd, NULL::int AS pass, NULL::int AS type_id, NULL::text AS type_name, diff --git a/stationapi/src/use_case/interactor/query.rs b/stationapi/src/use_case/interactor/query.rs index bc0d770b..864c7770 100644 --- a/stationapi/src/use_case/interactor/query.rs +++ b/stationapi/src/use_case/interactor/query.rs @@ -72,7 +72,7 @@ where return Ok(None); } let stations = self - .update_station_vec_with_attributes(vec![station], None, transport_type, false) + .update_station_vec_with_attributes(vec![station], None, transport_type, true) .await?; Ok(stations.into_iter().next()) @@ -89,7 +89,7 @@ where .filter(|s| matches_transport_filter(s.transport_type, transport_type)) .collect(); let stations = self - .update_station_vec_with_attributes(stations, None, transport_type, false) + .update_station_vec_with_attributes(stations, None, transport_type, true) .await?; Ok(stations) @@ -161,7 +161,7 @@ where .await?; let stations = self - .update_station_vec_with_attributes(stations, None, transport_type, false) + .update_station_vec_with_attributes(stations, None, transport_type, true) .await?; Ok(stations) @@ -269,7 +269,7 @@ where .await?; let stations = self - .update_station_vec_with_attributes(stations, None, transport_type, false) + .update_station_vec_with_attributes(stations, None, transport_type, true) .await?; Ok(stations)