Skip to content
Snippets Groups Projects
Unverified Commit 75a7a706 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

journey: properly handle origin/destination and route_{start,end}

parent da949651
No related branches found
No related tags found
No related merge requests found
......@@ -126,16 +126,19 @@ sub new {
is_cancelled => $is_cancelled,
train => $train,
operator => $operator,
route_end => $destination,
destination => $destination,
route_end => $stops[-1]{name},
messages => \@messages,
route => \@stops,
};
if ( $hafas->{arrivals} ) {
$ref->{origin} = $ref->{route_end};
}
else {
$ref->{destination} = $ref->{route_end};
if ( $journey->{stbStop} ) {
if ( $hafas->{arrivals} ) {
$ref->{origin} = $ref->{route_end};
}
else {
$ref->{destination} = $ref->{route_end};
}
}
bless( $ref, $obj );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment