fix(phase26): add Pi trip deletion (BUG-08)

This commit is contained in:
Mathieu Moran
2026-08-11 02:07:59 -04:00
parent 786d5b8f3e
commit c5c478bef6
7 changed files with 33 additions and 4 deletions
+11
View File
@@ -540,6 +540,17 @@ def get_trip_route(trip_id, max_points=2000):
}
def delete_trip(trip_id):
"""Delete a computed trip record. Raw tracking rows are NOT removed."""
conn = get_conn()
if conn is None:
return False
with _conn_lock:
cur = conn.execute("DELETE FROM trips WHERE id = ?", (trip_id,))
conn.commit()
return cur.rowcount > 0
def get_setting(key, default=None):
"""Read a persisted UI/app setting (e.g. the dashcam-upload toggle)."""
conn = get_conn()