diff --git a/server/src/domain/asset/asset.service.ts b/server/src/domain/asset/asset.service.ts index 325bb8ea4c..f328b5dcf6 100644 --- a/server/src/domain/asset/asset.service.ts +++ b/server/src/domain/asset/asset.service.ts @@ -326,7 +326,7 @@ export class AssetService { const stackIdsToCheckForDelete: string[] = []; if (removeParent) { (options as Partial).stack = null; - const assets = await this.assetRepository.getByIds(ids); + const assets = await this.assetRepository.getByIds(ids, { stack: true }); stackIdsToCheckForDelete.push(...new Set(assets.filter((a) => !!a.stackId).map((a) => a.stackId!))); // This updates the updatedAt column of the parents to indicate that one of its children is removed // All the unique parent's -> parent is set to null