summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/DBWagenreihung.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/DBWagenreihung.pm b/lib/Travel/Status/DE/DBWagenreihung.pm
index ce8cc63..cadee0b 100644
--- a/lib/Travel/Status/DE/DBWagenreihung.pm
+++ b/lib/Travel/Status/DE/DBWagenreihung.pm
@@ -77,6 +77,13 @@ sub get_wagonorder {
return;
}
+ if ( @{ $json->{data}{istformation}{allFahrzeuggruppe} // [] } == 0
+ and @{ $json->{data}{istformation}{halt} // [] } == 0 )
+ {
+ $self->{errstr} = 'No wagon order available';
+ return;
+ }
+
$self->{data} = $json->{data};
$self->{meta} = $json->{meta};
}