Compare commits

..

2 Commits

Author SHA1 Message Date
02154d4517 Fix getting correct requested data 2025-09-03 03:15:09 +02:00
ef850cb0da Fix missing parentheses for utc now function 2025-09-03 02:57:29 +02:00

View File

@ -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:
@ -101,7 +101,7 @@ def getGpsDistance():
else: else:
prettyDistance = "No GPS Signal" prettyDistance = "No GPS Signal"
fwd_azimuth = 0.0 fwd_azimuth = 0.0
rTime = datetime.utcnow rTime = datetime.utcnow()