summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Model
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2023-01-02 15:05:37 +0100
committerDaniel Friesel <derf@finalrewind.org>2023-01-02 15:05:37 +0100
commitcf7f993309426604c67937f2363b9717fa1269f4 (patch)
treec9db03d83fbf8c4991d5de14c00dd8a987a8c61d /lib/Travelynx/Model
parent4c1ae6d045354fa2c95478e4523d67ae56352ce8 (diff)
review: skip journeys with negative duration1.29.3
Diffstat (limited to 'lib/Travelynx/Model')
-rwxr-xr-xlib/Travelynx/Model/Journeys.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm
index f23c2b1..f577236 100755
--- a/lib/Travelynx/Model/Journeys.pm
+++ b/lib/Travelynx/Model/Journeys.pm
@@ -1088,7 +1088,7 @@ sub compute_review {
my %seen;
- if ( $journey->{rt_duration} ) {
+ if ( $journey->{rt_duration} and $journey->{rt_duration} > 0 ) {
if ( not $longest_t
or $journey->{rt_duration} > $longest_t->{rt_duration} )
{
@@ -1163,7 +1163,7 @@ sub compute_review {
}
}
- if ( $journey->{rt_duration} and $journey->{sched_duration} ) {
+ if ( $journey->{rt_duration} and $journey->{sched_duration} and $journey->{rt_duration} > 0 and $journey->{sched_duration} > 0 ) {
my $slowdown = $journey->{rt_duration} - $journey->{sched_duration};
my $speedup = -$slowdown;
if (