diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-10-14 21:27:50 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-10-14 21:27:50 +0200 |
commit | 9ab4abe29ee2e7d9b495c346acfcd0940b65727e (patch) | |
tree | c611445ce4823020e5e54a7e8c6cb90073ef4612 /lib/Travel/Status/DE/EFA | |
parent | a43e50f5feb3f9105f30094e9bdf0f5a194df09f (diff) |
Trip: Account for subtle differences in STOPSEQCOORD output (observed at VVO)
Diffstat (limited to 'lib/Travel/Status/DE/EFA')
-rw-r--r-- | lib/Travel/Status/DE/EFA/Trip.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/EFA/Trip.pm b/lib/Travel/Status/DE/EFA/Trip.pm index b7f495d..5698e8d 100644 --- a/lib/Travel/Status/DE/EFA/Trip.pm +++ b/lib/Travel/Status/DE/EFA/Trip.pm @@ -18,7 +18,7 @@ Travel::Status::DE::EFA::Trip->mk_ro_accessors( sub new { my ( $obj, %conf ) = @_; - my $json = $conf{json}{transportation}; + my $json = $conf{json}{transportation} // $conf{json}{leg}{transportation}; my $ref = { operator => $json->{operator}{name}, @@ -32,7 +32,8 @@ sub new { id => $json->{id}, dest_name => $json->{destination}{name}, dest_id => $json->{destination}{id}, - route_raw => $json->{locationSequence}, + route_raw => $json->{locationSequence} + // $conf{json}{leg}{stopSequence}, strptime_obj => DateTime::Format::Strptime->new( pattern => '%Y-%m-%dT%H:%M:%SZ', time_zone => 'UTC' |