backend selection: handle backends that are no longer supported
This commit is contained in:
parent
78d4494364
commit
e6ba4b0e3b
1 changed files with 9 additions and 3 deletions
|
@ -1012,13 +1012,19 @@ sub backend_form {
|
|||
$backend->{name} = 'DB';
|
||||
}
|
||||
elsif ( $backend->{hafas} ) {
|
||||
if ( my $s = $self->hafas->get_service( $backend->{name} ) ) {
|
||||
$type = 'HAFAS';
|
||||
$backend->{longname}
|
||||
= $self->hafas->get_service( $backend->{name} )->{name};
|
||||
$backend->{longname} = $s->{name};
|
||||
}
|
||||
else {
|
||||
$type = undef;
|
||||
}
|
||||
}
|
||||
$backend->{type} = $type;
|
||||
}
|
||||
|
||||
@backends = grep { $_->{type} } @backends;
|
||||
|
||||
$self->render(
|
||||
'select_backend',
|
||||
backends => \@backends,
|
||||
|
|
Loading…
Reference in a new issue