summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-12-12 20:35:55 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-12-12 20:35:55 +0100
commit05deb16d8f912bfb9becf371541c2b96bbd79731 (patch)
tree810c2b52a8f1e597c999432de27597e4994c0462 /lib
parent76d0408ed6e6c17d5e485b458500988ead280188 (diff)
Stationboard: directly pass unknown EVA IDs to backend
Diffstat (limited to 'lib')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm6
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(