summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-08-22 09:21:02 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-08-22 09:21:02 +0200
commitecc419e6461d231e5ae8a69f37784421c0a72990 (patch)
tree39d0dc1017334d2554a9d6672fcddce08433acad /lib
parent6ca55f83b12e01b0f465ba53e16da74b44600cab (diff)
select latest journey based on timestamp, not ID2.0.2
This avoids manually added past journeys messing with the latest travel target
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Travelynx/Model/Journeys.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm
index 532f9cd..1c975f4 100755
--- a/lib/Travelynx/Model/Journeys.pm
+++ b/lib/Travelynx/Model/Journeys.pm
@@ -704,7 +704,7 @@ sub get_latest {
cancelled => 0
},
{
- order_by => { -desc => 'journey_id' },
+ order_by => { -desc => 'real_dep_ts' },
limit => 1
}
)->expand->hash;