Explorar o código

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

GenericGuy hai 1 ano
pai
achega
ed386dd12a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/src/infra/repositories/person.repository.ts

+ 1 - 1
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) {