Skip to content

Commit

Permalink
do not add meta stations if eva is undef
Browse files Browse the repository at this point in the history
  • Loading branch information
derf committed Dec 4, 2024
1 parent 38d5234 commit 970f153
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/Travelynx/Controller/Traveling.pm
Original file line number Diff line number Diff line change
Expand Up @@ -951,11 +951,13 @@ sub station {
@results = map { $_->[0] }
sort { $b->[1] <=> $a->[1] }
map { [ $_, $_->datetime->epoch ] } $status->results;
$self->stations->add_meta(
eva => $status->station->{eva},
meta => $status->station->{evas} // [],
hafas => $hafas_service,
);
if ( $status->station->{eva} ) {
$self->stations->add_meta(
eva => $status->station->{eva},
meta => $status->station->{evas} // [],
hafas => $hafas_service,
);
}
$status = {
station_eva => $status->station->{eva},
station_name => (
Expand Down

0 comments on commit 970f153

Please sign in to comment.