fix: stranger_id=NULL on bind/merge; doc: add traces+mergeinto endpoints
This commit is contained in:
@@ -100,7 +100,7 @@ pub async fn bind_identity(
|
||||
|
||||
// Direct UPDATE face_detections.identity_id
|
||||
let result = sqlx::query(&format!(
|
||||
"UPDATE {} SET identity_id = $1 WHERE file_uuid = $2 AND face_id = $3",
|
||||
"UPDATE {} SET identity_id = $1, stranger_id = NULL WHERE file_uuid = $2 AND face_id = $3",
|
||||
table
|
||||
))
|
||||
.bind(identity_id)
|
||||
@@ -272,7 +272,7 @@ pub async fn merge_identities(
|
||||
|
||||
// Transfer all face bindings from source → target
|
||||
let updated = sqlx::query(&format!(
|
||||
"UPDATE {} SET identity_id = $1 WHERE identity_id = $2",
|
||||
"UPDATE {} SET identity_id = $1, stranger_id = NULL WHERE identity_id = $2",
|
||||
face_table
|
||||
))
|
||||
.bind(into_id)
|
||||
@@ -427,7 +427,7 @@ pub async fn bind_identity_trace(
|
||||
})?;
|
||||
|
||||
let result = sqlx::query(&format!(
|
||||
"UPDATE {} SET identity_id = $1 WHERE file_uuid = $2 AND trace_id = $3",
|
||||
"UPDATE {} SET identity_id = $1, stranger_id = NULL WHERE file_uuid = $2 AND trace_id = $3",
|
||||
fd_table
|
||||
))
|
||||
.bind(identity_id)
|
||||
|
||||
Reference in New Issue
Block a user