From ed386dd12ac5302268adb01a1ad1d4916c2ce274 Mon Sep 17 00:00:00 2001 From: GenericGuy Date: Sat, 14 Oct 2023 03:50:18 +0200 Subject: [PATCH] fix(server): always show people with name, ignore count (#4414) --- server/src/infra/repositories/person.repository.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/infra/repositories/person.repository.ts b/server/src/infra/repositories/person.repository.ts index b5d73d197..d651b3380 100644 --- a/server/src/infra/repositories/person.repository.ts +++ b/server/src/infra/repositories/person.repository.ts @@ -72,7 +72,7 @@ export class PersonRepository implements IPersonRepository { .addOrderBy("NULLIF(person.name, '') IS NULL", 'ASC') .addOrderBy('COUNT(face.assetId)', 'DESC') .addOrderBy("NULLIF(person.name, '')", 'ASC', 'NULLS LAST') - .having('COUNT(face.assetId) >= :faces', { faces: options?.minimumFaceCount || 1 }) + .having("person.name != '' OR COUNT(face.assetId) >= :faces", { faces: options?.minimumFaceCount || 1 }) .groupBy('person.id') .limit(500); if (!options?.withHidden) {