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:
Birte Kristina Friesel 2023-08-22 09:21:02 +02:00
parent 6ca55f83b1
commit ecc419e646
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA

View file

@ -704,7 +704,7 @@ sub get_latest {
cancelled => 0 cancelled => 0
}, },
{ {
order_by => { -desc => 'journey_id' }, order_by => { -desc => 'real_dep_ts' },
limit => 1 limit => 1
} }
)->expand->hash; )->expand->hash;