diff options
Diffstat (limited to 'lib/Travel/Status/DE')
-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' |