0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-02-11 01:18:24 -05:00

fix(server): memory lane assets order (#15882)

* fix(server): memory lane assets order

* fix: sql

* pr feedback

* sql
This commit is contained in:
Alex 2025-02-03 16:29:41 -06:00 committed by GitHub
parent 47f6181d42
commit 06f077bac2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -47,6 +47,8 @@ with
and "asset_files"."type" = $6
)
and "assets"."deletedAt" is null
order by
(assets."localDateTime" at time zone 'UTC')::date desc
limit
$7
) as "a" on true

View file

@ -121,6 +121,7 @@ export class AssetRepository implements IAssetRepository {
),
)
.where('assets.deletedAt', 'is', null)
.orderBy(sql`(assets."localDateTime" at time zone 'UTC')::date`, 'desc')
.limit(20)
.as('a'),
(join) => join.onTrue(),