summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-12-04 17:44:25 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-12-04 17:44:25 +0100
commit970f153175d31c9bef665d9b1627da2be9f88d4a (patch)
tree4d9a25d91104d7f82fe9e7ed75041c596f70c851
parent38d5234c8765c41bc2eed548ba64b54433b1c952 (diff)
do not add meta stations if eva is undefHEAD2.9.5main
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index 101ae11..cf292bd 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -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 => (