diff options
| author | Daniel Friesel <derf@finalrewind.org> | 2023-02-05 20:45:01 +0100 | 
|---|---|---|
| committer | Daniel Friesel <derf@finalrewind.org> | 2023-02-05 20:45:01 +0100 | 
| commit | 3d714495e68b097112e38fb2e45fcd1276b67b86 (patch) | |
| tree | 39f9493c9a4db39404cd162d78cae6da1a29ef32 | |
| parent | 30df90e0617e26b680f37f21696781118974bf22 (diff) | |
hafas: fix redirect lop on error
| -rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 2 | 
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}"); | 
