Fix getting correct requested data

This commit is contained in:
Tim Staat 2025-09-03 03:15:09 +02:00
parent ef850cb0da
commit 02154d4517

View File

@ -59,7 +59,7 @@ def getGpsDistance():
cur = conn.cursor()
try:
res = cur.execute(f'SELECT lat, long, gpsDateTime, insertDateTime FROM location_data WHERE sender_id = {req_id} ORDER BY insertDateTime DESC;')
res = cur.execute(f'SELECT lat, long, gpsDateTime, insertDateTime FROM location_data WHERE sender_id = {req_id} ORDER BY ROWID DESC LIMIT 1;')
row = res.fetchone()
if row: