diff --git a/front/src/applications/operationalStudies/components/MacroEditor/osrdToNge.ts b/front/src/applications/operationalStudies/components/MacroEditor/osrdToNge.ts index a48c55520a0..de9c6db3a5e 100644 --- a/front/src/applications/operationalStudies/components/MacroEditor/osrdToNge.ts +++ b/front/src/applications/operationalStudies/components/MacroEditor/osrdToNge.ts @@ -242,7 +242,9 @@ const importTimetable = async ( body: { ids: train_ids }, }) ); - const trainSchedules = await trainSchedulesPromise.unwrap(); + const trainSchedules = (await trainSchedulesPromise.unwrap()).filter( + (trainSchedule) => trainSchedule.path.length >= 2 + ); const searchPayload = buildOpQuery(infraId, trainSchedules); const searchResults = searchPayload ? await executeSearch(searchPayload, dispatch) : [];