From 9d0af20c38ecf47304b494e12fb2d7c96aa0cce9 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 2 Jul 2021 21:08:00 +0200 Subject: only show ambiguous page if the input -really- was ambiguous --- lib/DBInfoscreen/Controller/Stationboard.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 55dcd0b..0bf1895 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -34,8 +34,12 @@ sub handle_no_results { my @candidates = map { [ $_->[1], $_->[0] ] } Travel::Status::DE::IRIS::Stations::get_station($station); - if ( @candidates > 1 - or ( @candidates == 1 and $candidates[0][1] ne $station ) ) + if ( + @candidates > 1 + or ( @candidates == 1 + and $candidates[0][0] ne $station + and $candidates[0][1] ne $station ) + ) { $self->render( 'landingpage', -- cgit v1.2.3