Skip to content

High performance self-hosted photo and video management solution.

fix(server): always show people with name, ignore count (#4414)

GenericGuyed386dd12ac5
diff --git a/server/src/infra/repositories/person.repository.ts b/server/src/infra/repositories/person.repository.ts
index b5d73d1974..d651b3380a 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) {