summaryrefslogtreecommitdiff
path: root/lib/Travel
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-12-11 16:31:31 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-12-11 16:44:11 +0100
commit0a01de6e687a5e4bd03f21169bb6dc6b05833bb7 (patch)
tree133e2af783f6f0e4189ff258d83e5d84f5a06f06 /lib/Travel
parenta0a3c662a714b32b2b779914a8c5c1505d2e6af8 (diff)
new_p: handle unknown EVA IDs
Diffstat (limited to 'lib/Travel')
-rw-r--r--lib/Travel/Status/DE/IRIS.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm
index 3b1ff47..1f364ac 100644
--- a/lib/Travel/Status/DE/IRIS.pm
+++ b/lib/Travel/Status/DE/IRIS.pm
@@ -54,6 +54,15 @@ sub new_p {
my @candidates = $opt{get_station}( $opt{station} );
+ if ( @candidates != 1 and $opt{station} =~ m{^\d+$} ) {
+ @candidates = (
+ [
+ "D$opt{station}", "Betriebsstelle nicht bekannt $opt{station}",
+ $opt{station}
+ ]
+ );
+ }
+
if ( @candidates == 0 ) {
return $promise->reject('station not found');
}