diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-12-04 17:44:25 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-12-04 17:44:25 +0100 |
commit | 970f153175d31c9bef665d9b1627da2be9f88d4a (patch) | |
tree | 4d9a25d91104d7f82fe9e7ed75041c596f70c851 /lib/Travelynx | |
parent | 38d5234c8765c41bc2eed548ba64b54433b1c952 (diff) |
do not add meta stations if eva is undef2.9.5
Diffstat (limited to 'lib/Travelynx')
-rwxr-xr-x | lib/Travelynx/Controller/Traveling.pm | 12 |
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 => ( |