diff --git a/server/src/queries/album.repository.sql b/server/src/queries/album.repository.sql index 8f171466338c0..48dc4dda4e5aa 100644 --- a/server/src/queries/album.repository.sql +++ b/server/src/queries/album.repository.sql @@ -98,7 +98,6 @@ select where "albums_assets_assets"."albumsId" = "albums"."id" and "assets"."deletedAt" is null - and "assets"."isArchived" = $1 order by "assets"."fileCreatedAt" desc ) as "asset" @@ -106,7 +105,7 @@ select from "albums" where - "albums"."id" = $2 + "albums"."id" = $1 and "albums"."deletedAt" is null -- AlbumRepository.getByAssetId diff --git a/server/src/repositories/album.repository.ts b/server/src/repositories/album.repository.ts index e32a53e82d2cd..d3b696169b748 100644 --- a/server/src/repositories/album.repository.ts +++ b/server/src/repositories/album.repository.ts @@ -63,7 +63,6 @@ const withAssets = (eb: ExpressionBuilder) => { .innerJoin('albums_assets_assets', 'albums_assets_assets.assetsId', 'assets.id') .whereRef('albums_assets_assets.albumsId', '=', 'albums.id') .where('assets.deletedAt', 'is', null) - .where('assets.isArchived', '=', false) .orderBy('assets.fileCreatedAt', 'desc') .as('asset'), )