From 9ab4abe29ee2e7d9b495c346acfcd0940b65727e Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 14 Oct 2024 21:27:50 +0200 Subject: Trip: Account for subtle differences in STOPSEQCOORD output (observed at VVO) --- lib/Travel/Status/DE/EFA/Trip.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') 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' -- cgit v1.2.3