0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-28 00:59:18 -05:00

fix(server): searching for multiple people yields false positives (#15447)

This commit is contained in:
David Wolff 2025-01-19 19:01:21 +01:00 committed by GitHub
parent 97ec3b147c
commit 70809c1465
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -248,7 +248,7 @@ export function hasPeopleCte(db: Kysely<DB>, personIds: string[]) {
.select('assetId')
.where('personId', '=', anyUuid(personIds!))
.groupBy('assetId')
.having((eb) => eb.fn.count('personId'), '>=', personIds.length),
.having((eb) => eb.fn.count('personId').distinct(), '=', personIds.length),
);
}