summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-12-26 19:04:12 +0100
committerDaniel Friesel <derf@finalrewind.org>2018-12-26 19:04:12 +0100
commitca490a14daae934d4e846d900a8dde40cab2fc46 (patch)
treec884b0f7689644852cd855adec9fda7741cc9d9d
parent789709229f032afe6ba0b4baac00fc978d737c92 (diff)
skip unknown/invalid sections
-rw-r--r--lib/Travel/Status/DE/DBWagenreihung.pm3
1 files changed, 3 insertions, 0 deletions
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(