fix(phase26): add Pi trip deletion (BUG-08)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user