summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Model
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-11-24 21:26:45 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-11-24 21:26:45 +0100
commit3851f0551896a5b6860cd524c104ebaa49f0ebd9 (patch)
tree04e80f8da5c582a3069f8bc844096572a2998e3a /lib/Travelynx/Model
parent4b4c9759786539e575ae6c752681d7af446f9544 (diff)
get_travel_distance: warn about removed stations (TODO: re-add them)
Diffstat (limited to 'lib/Travelynx/Model')
-rwxr-xr-xlib/Travelynx/Model/Journeys.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm
index e747198..a8ca299 100755
--- a/lib/Travelynx/Model/Journeys.pm
+++ b/lib/Travelynx/Model/Journeys.pm
@@ -957,6 +957,16 @@ sub get_travel_distance {
my $route_ref = $journey->{route};
my $polyline_ref = $journey->{polyline};
+ if ( not $to ) {
+ $self->{log}
+ ->warn("Journey $journey->{id} has no to_name for EVA $to_eva");
+ }
+
+ if ( not $from ) {
+ $self->{log}
+ ->warn("Journey $journey->{id} has no from_name for EVA $from_eva");
+ }
+
my $distance_polyline = 0;
my $distance_intermediate = 0;
my $distance_beeline = 0;