diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-08-16 22:21:53 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-08-16 22:21:53 +0200 |
commit | 82989ba2d67220db12f96262bac4762e4da0c02b (patch) | |
tree | 1839dfcddf9bb5dd224fb87c4768f1065b283b43 /lib/Travel | |
parent | 42727cb8aec147ba673c0b27e99c8f424e1e275c (diff) |
Services.pm.PL: Handle transport-apis definitions without mot names
Diffstat (limited to 'lib/Travel')
-rw-r--r-- | lib/Travel/Status/DE/HAFAS/Services.pm.PL | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/HAFAS/Services.pm.PL b/lib/Travel/Status/DE/HAFAS/Services.pm.PL index 97eabef..638bd53 100644 --- a/lib/Travel/Status/DE/HAFAS/Services.pm.PL +++ b/lib/Travel/Status/DE/HAFAS/Services.pm.PL @@ -46,7 +46,12 @@ sub load_instance { for ( 1 .. $skipped ) { push( @{ $ret{productbits} }, [ "_", undef ] ); } - push( @{ $ret{productbits} }, [ $p->{id}, $p->{name} ] ); + if ( $p->{name} ) { + push( @{ $ret{productbits} }, [ $p->{id}, $p->{name} ] ); + } + else { + push( @{ $ret{productbits} }, $p->{id} ); + } } else { $skipped += 1; |