You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-08 23:07:06 +02:00
fix(server): do not count deleted assets for album summary (#15668)
fixes #15645 fixes #15646
This commit is contained in:
@ -210,6 +210,7 @@ from
|
||||
left join "assets" on "assets"."id" = "album_assets"."assetsId"
|
||||
where
|
||||
"albums"."id" in ($1)
|
||||
and "assets"."deletedAt" is null
|
||||
group by
|
||||
"albums"."id"
|
||||
|
||||
|
@ -126,6 +126,7 @@ export class AlbumRepository implements IAlbumRepository {
|
||||
.select((eb) => eb.fn.max('assets.fileCreatedAt').as('endDate'))
|
||||
.select((eb) => eb.fn.count('assets.id').as('assetCount'))
|
||||
.where('albums.id', 'in', ids)
|
||||
.where('assets.deletedAt', 'is', null)
|
||||
.groupBy('albums.id')
|
||||
.execute();
|
||||
|
||||
|
Reference in New Issue
Block a user