mirror of
https://github.com/immich-app/immich.git
synced 2025-06-23 15:34:03 -04:00
fix(server): out of memory when unstacking assets (#7332)
This commit is contained in:
parent
ec55acc98c
commit
e3cccba78c
@ -326,7 +326,7 @@ export class AssetService {
|
|||||||
const stackIdsToCheckForDelete: string[] = [];
|
const stackIdsToCheckForDelete: string[] = [];
|
||||||
if (removeParent) {
|
if (removeParent) {
|
||||||
(options as Partial<AssetEntity>).stack = null;
|
(options as Partial<AssetEntity>).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!)));
|
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
|
// 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
|
// All the unique parent's -> parent is set to null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user