fix: type mismatch BIGINT->INT4 and FLOAT8->FLOAT4 in traces and faces endpoints
- trace_agent_api: CAST trace_id, frame_number to int; CAST confidence to float4 - identities: CAST frame_number to int; CAST confidence to float4 - Fixes 500 errors on /traces, /trace/:id/faces, /faces/candidates
This commit is contained in:
@@ -328,7 +328,7 @@ async fn list_face_candidates(
|
||||
|
||||
let rows = if let Some(file_uuid) = &query.file_uuid {
|
||||
let sql = format!(
|
||||
"SELECT id, face_id, file_uuid, frame_number, confidence,
|
||||
"SELECT id, face_id, file_uuid, frame_number::int, confidence::float4,
|
||||
jsonb_build_object('x', x, 'y', y, 'width', width, 'height', height) as bbox,
|
||||
NULL::jsonb as attributes
|
||||
FROM {}
|
||||
@@ -366,7 +366,7 @@ async fn list_face_candidates(
|
||||
}
|
||||
} else {
|
||||
let sql = format!(
|
||||
"SELECT id, face_id, file_uuid, frame_number, confidence,
|
||||
"SELECT id, face_id, file_uuid, frame_number::int, confidence::float4,
|
||||
jsonb_build_object('x', x, 'y', y, 'width', width, 'height', height) as bbox,
|
||||
NULL::jsonb as attributes
|
||||
FROM {}
|
||||
|
||||
Reference in New Issue
Block a user