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';
|
$backend->{name} = 'DB';
|
||||||
}
|
}
|
||||||
elsif ( $backend->{hafas} ) {
|
elsif ( $backend->{hafas} ) {
|
||||||
$type = 'HAFAS';
|
if ( my $s = $self->hafas->get_service( $backend->{name} ) ) {
|
||||||
$backend->{longname}
|
$type = 'HAFAS';
|
||||||
= $self->hafas->get_service( $backend->{name} )->{name};
|
$backend->{longname} = $s->{name};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$type = undef;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$backend->{type} = $type;
|
$backend->{type} = $type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@backends = grep { $_->{type} } @backends;
|
||||||
|
|
||||||
$self->render(
|
$self->render(
|
||||||
'select_backend',
|
'select_backend',
|
||||||
backends => \@backends,
|
backends => \@backends,
|
||||||
|
|
Loading…
Reference in a new issue