diff options
author | Daniel Friesel <derf@finalrewind.org> | 2023-02-05 20:45:13 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2023-02-05 20:45:13 +0100 |
commit | b13972296f64499debf19c309d3144f406c397c3 (patch) | |
tree | 1e66f25f93cd5bde84a3ce90c300e9e6e930bb2b /lib | |
parent | 3d714495e68b097112e38fb2e45fcd1276b67b86 (diff) |
hafas: show errors rather than location selection
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 5cb05c4..aa301fb 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -56,8 +56,13 @@ sub handle_no_results { $candidate->[0] =~ s{[&]#x0028;}{(}g; $candidate->[0] =~ s{[&]#x0029;}{)}g; } + my $err; + if ( not $errstr =~ m{LOCATION} ) { + $err = $errstr; + } $self->render( 'landingpage', + error => $err, stationlist => \@candidates, hide_opts => 0, status => 300, |