mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
fix(server): sort un-named faces in query (#3662)
This commit is contained in:
@@ -56,6 +56,7 @@ export class PersonRepository implements IPersonRepository {
|
||||
.leftJoin('person.faces', 'face')
|
||||
.where('person.ownerId = :userId', { userId })
|
||||
.orderBy('COUNT(face.assetId)', 'DESC')
|
||||
.addOrderBy("NULLIF(person.name, '')", 'ASC', 'NULLS LAST')
|
||||
.having('COUNT(face.assetId) >= :faces', { faces: options?.minimumFaceCount || 1 })
|
||||
.groupBy('person.id')
|
||||
.limit(500)
|
||||
|
||||
Reference in New Issue
Block a user