mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore(server): replace usage of deprecated orderBy and remove unnecessary instruction (#19072)
* replace usage of deprecated orderBy instruction remove unnecesarry extra order instruction update e2e test * rename symbols
This commit is contained in:
parent
5f5308631e
commit
77a362f0c0
2 changed files with 70 additions and 8 deletions
|
|
@ -179,9 +179,8 @@ export class PersonRepository {
|
|||
)
|
||||
.$if(!options?.closestFaceAssetId, (qb) =>
|
||||
qb
|
||||
.orderBy(sql`NULLIF(person.name, '') is null`, 'asc')
|
||||
.orderBy((eb) => eb.fn.count('asset_faces.assetId'), 'desc')
|
||||
.orderBy(sql`NULLIF(person.name, '')`, sql`asc nulls last`)
|
||||
.orderBy(sql`NULLIF(person.name, '') asc nulls last`)
|
||||
.orderBy('person.createdAt'),
|
||||
)
|
||||
.$if(!options?.withHidden, (qb) => qb.where('person.isHidden', '=', false))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue