summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-09-26 21:51:29 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-09-26 21:51:29 +0200
commitbeb609fa8b97a3a071f76448203daa880d34d204 (patch)
treee85a074d8267b0db918b8704c91bab7d8aaa91b6
parent128e6283f38db5393beafd5e069a4411b41a93c4 (diff)
itdOdvAssignedStops can be a hashref rather than a listref...
-rw-r--r--lib/Travel/Status/DE/EFA.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/EFA.pm b/lib/Travel/Status/DE/EFA.pm
index d2a9174..2c08575 100644
--- a/lib/Travel/Status/DE/EFA.pm
+++ b/lib/Travel/Status/DE/EFA.pm
@@ -376,8 +376,14 @@ sub stops {
return @{ $self->{stops} };
}
+ my $stops = $self->{response}{dm}{itdOdvAssignedStops} // [];
+
+ if ( ref($stops) eq 'HASH' ) {
+ $stops = [$stops];
+ }
+
my @stops;
- for my $stop ( @{ $self->{response}{dm}{itdOdvAssignedStops} // [] } ) {
+ for my $stop ( @{$stops} ) {
push(
@stops,
Travel::Status::DE::EFA::Stop->new(