summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/HAFAS
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-08-16 22:21:53 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-08-16 22:21:53 +0200
commit82989ba2d67220db12f96262bac4762e4da0c02b (patch)
tree1839dfcddf9bb5dd224fb87c4768f1065b283b43 /lib/Travel/Status/DE/HAFAS
parent42727cb8aec147ba673c0b27e99c8f424e1e275c (diff)
Services.pm.PL: Handle transport-apis definitions without mot names
Diffstat (limited to 'lib/Travel/Status/DE/HAFAS')
-rw-r--r--lib/Travel/Status/DE/HAFAS/Services.pm.PL7
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;