fix: prevent duplicate face group cards - deduplicate tkg_nodes and DISTINCT ON in get_face_groups_handler
This commit is contained in:
+2
-1
@@ -1363,7 +1363,8 @@ pub async fn get_face_groups_handler(
|
||||
.unwrap_or_else(crate::core::file_profile::FaceFilterSettings::defaults);
|
||||
|
||||
let rows: Vec<(String, i32, Option<i32>)> = sqlx::query_as(&format!(
|
||||
"SELECT COALESCE(tp.name, tn.label) as name, \
|
||||
"SELECT DISTINCT ON (COALESCE(tp.trace_id, (tn.properties->>'trace_id')::int)) \
|
||||
COALESCE(tp.name, tn.label) as name, \
|
||||
COALESCE(tp.trace_id, (tn.properties->>'trace_id')::int) as trace_id, \
|
||||
tp.frame_count \
|
||||
FROM {} tn \
|
||||
|
||||
Reference in New Issue
Block a user