diff options
author | Daniel Friesel <derf@finalrewind.org> | 2022-12-12 20:35:55 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2022-12-12 20:35:55 +0100 |
commit | 05deb16d8f912bfb9becf371541c2b96bbd79731 (patch) | |
tree | 810c2b52a8f1e597c999432de27597e4994c0462 /lib/DBInfoscreen/Controller/Stationboard.pm | |
parent | 76d0408ed6e6c17d5e485b458500988ead280188 (diff) |
Stationboard: directly pass unknown EVA IDs to backend
Diffstat (limited to 'lib/DBInfoscreen/Controller/Stationboard.pm')
-rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 6 |
1 files changed, 6 insertions, 0 deletions
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( |