summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2023-02-05 20:45:01 +0100
committerDaniel Friesel <derf@finalrewind.org>2023-02-05 20:45:01 +0100
commit3d714495e68b097112e38fb2e45fcd1276b67b86 (patch)
tree39f9493c9a4db39404cd162d78cae6da1a29ef32 /lib/DBInfoscreen
parent30df90e0617e26b680f37f21696781118974bf22 (diff)
hafas: fix redirect lop on error
Diffstat (limited to 'lib/DBInfoscreen')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index 04b0ba3..5cb05c4 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -46,7 +46,7 @@ sub handle_no_results {
sub {
my (@candidates) = @_;
@candidates = map { [ $_->{name}, $_->{id} ] } @candidates;
- if ( @candidates == 1 ) {
+ if ( @candidates == 1 and $candidates[0][0] ne $station ) {
my $s = $candidates[0][0];
my $params = $self->req->params->to_string;
$self->redirect_to("/${s}?${params}");