mirror of
https://github.com/derf/travelynx
synced 2024-12-02 17:29:11 +00:00
review: skip journeys with negative duration
This commit is contained in:
parent
4c1ae6d045
commit
cf7f993309
1 changed files with 2 additions and 2 deletions
|
@ -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 (
|
||||
|
|
Loading…
Reference in a new issue