From 970f153175d31c9bef665d9b1627da2be9f88d4a Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 4 Dec 2024 17:44:25 +0100 Subject: do not add meta stations if eva is undef --- lib/Travelynx/Controller/Traveling.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib') 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 => ( -- cgit v1.2.3