Fix getting correct requested data
This commit is contained in:
parent
ef850cb0da
commit
02154d4517
|
|
@ -59,7 +59,7 @@ def getGpsDistance():
|
||||||
cur = conn.cursor()
|
cur = conn.cursor()
|
||||||
try:
|
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()
|
row = res.fetchone()
|
||||||
|
|
||||||
if row:
|
if row:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user