mirror of
https://github.com/immich-app/immich.git
synced 2025-04-14 12:06:25 +02:00
fix(server): failed to get albums with archived assets (#15611)
* fix(mobile): failed to get albums with archived assets * sql
This commit is contained in:
parent
3c1fa22109
commit
9d8072b994
2 changed files with 1 additions and 3 deletions
server/src
|
@ -98,7 +98,6 @@ select
|
||||||
where
|
where
|
||||||
"albums_assets_assets"."albumsId" = "albums"."id"
|
"albums_assets_assets"."albumsId" = "albums"."id"
|
||||||
and "assets"."deletedAt" is null
|
and "assets"."deletedAt" is null
|
||||||
and "assets"."isArchived" = $1
|
|
||||||
order by
|
order by
|
||||||
"assets"."fileCreatedAt" desc
|
"assets"."fileCreatedAt" desc
|
||||||
) as "asset"
|
) as "asset"
|
||||||
|
@ -106,7 +105,7 @@ select
|
||||||
from
|
from
|
||||||
"albums"
|
"albums"
|
||||||
where
|
where
|
||||||
"albums"."id" = $2
|
"albums"."id" = $1
|
||||||
and "albums"."deletedAt" is null
|
and "albums"."deletedAt" is null
|
||||||
|
|
||||||
-- AlbumRepository.getByAssetId
|
-- AlbumRepository.getByAssetId
|
||||||
|
|
|
@ -63,7 +63,6 @@ const withAssets = (eb: ExpressionBuilder<DB, 'albums'>) => {
|
||||||
.innerJoin('albums_assets_assets', 'albums_assets_assets.assetsId', 'assets.id')
|
.innerJoin('albums_assets_assets', 'albums_assets_assets.assetsId', 'assets.id')
|
||||||
.whereRef('albums_assets_assets.albumsId', '=', 'albums.id')
|
.whereRef('albums_assets_assets.albumsId', '=', 'albums.id')
|
||||||
.where('assets.deletedAt', 'is', null)
|
.where('assets.deletedAt', 'is', null)
|
||||||
.where('assets.isArchived', '=', false)
|
|
||||||
.orderBy('assets.fileCreatedAt', 'desc')
|
.orderBy('assets.fileCreatedAt', 'desc')
|
||||||
.as('asset'),
|
.as('asset'),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue