From ca490a14daae934d4e846d900a8dde40cab2fc46 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 26 Dec 2018 19:04:12 +0100 Subject: skip unknown/invalid sections --- lib/Travel/Status/DE/DBWagenreihung.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Travel/Status/DE/DBWagenreihung.pm') diff --git a/lib/Travel/Status/DE/DBWagenreihung.pm b/lib/Travel/Status/DE/DBWagenreihung.pm index 0a750b5..6d4f551 100644 --- a/lib/Travel/Status/DE/DBWagenreihung.pm +++ b/lib/Travel/Status/DE/DBWagenreihung.pm @@ -101,6 +101,9 @@ sub sections { for my $section ( @{ $self->{data}{istformation}{halt}{allSektor} } ) { my $pos = $section->{positionamgleis}; + if ( $pos->{startprozent} eq '' or $pos->{endeprozent} eq '' ) { + next; + } push( @{ $self->{sections} }, Travel::Status::DE::DBWagenreihung::Section->new( -- cgit v1.2.3