From 82989ba2d67220db12f96262bac4762e4da0c02b Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 16 Aug 2024 22:21:53 +0200 Subject: Services.pm.PL: Handle transport-apis definitions without mot names --- lib/Travel/Status/DE/HAFAS/Services.pm.PL | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') 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; -- cgit v1.2.3