Skip to content

Commit

Permalink
front: fix nge import when there is only one step
Browse files Browse the repository at this point in the history
Signed-off-by: romainvalls <romain.valls95@gmail.com>
  • Loading branch information
RomainValls committed Dec 5, 2024
1 parent 21e6b6f commit 52c374b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) : [];
Expand Down

0 comments on commit 52c374b

Please sign in to comment.