select latest journey based on timestamp, not ID
This avoids manually added past journeys messing with the latest travel target
This commit is contained in:
parent
6ca55f83b1
commit
ecc419e646
1 changed files with 1 additions and 1 deletions
|
@ -704,7 +704,7 @@ sub get_latest {
|
|||
cancelled => 0
|
||||
},
|
||||
{
|
||||
order_by => { -desc => 'journey_id' },
|
||||
order_by => { -desc => 'real_dep_ts' },
|
||||
limit => 1
|
||||
}
|
||||
)->expand->hash;
|
||||
|
|
Loading…
Reference in a new issue