recognize: filter user in unassigned (fix #773)

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/783/head
Varun Patil 2023-08-16 08:18:51 -07:00
parent a6d7ddecdb
commit b513650892
1 changed files with 4 additions and 1 deletions

View File

@ -94,7 +94,10 @@ class RecognizeBackend extends Backend
// Join with cluster
$clusterQuery = null;
if ('NULL' === $faceName) {
$clusterQuery = $query->expr()->eq('rfd.cluster_id', $query->expr()->literal(-1));
$clusterQuery = $query->expr()->andX(
$query->expr()->eq('rfd.user_id', $query->createNamedParameter(Util::getUID())),
$query->expr()->eq('rfd.cluster_id', $query->expr()->literal(-1))
);
} else {
$nameField = is_numeric($faceName) ? 'rfc.id' : 'rfc.title';
$query->innerJoin('m', 'recognize_face_clusters', 'rfc', $query->expr()->andX(