From 05deb16d8f912bfb9becf371541c2b96bbd79731 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 12 Dec 2022 20:35:55 +0100 Subject: Stationboard: directly pass unknown EVA IDs to backend --- lib/DBInfoscreen/Controller/Stationboard.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/DBInfoscreen/Controller') diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index c02a342..145a5e3 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -275,6 +275,12 @@ sub get_results_p { # if we have an exact match. Ask the backend otherwise. my @station_matches = Travel::Status::DE::IRIS::Stations::get_station($station); + + # Requests with EVA codes can be handled even if we do not know about them. + if ( @station_matches != 1 and $station =~ m{^\d+$} ) { + @station_matches = ( [ undef, undef, $station ] ); + } + if ( @station_matches == 1 ) { $station = $station_matches[0][2]; return Travel::Status::DE::IRIS->new_p( -- cgit v1.2.3