Skip to content

Commit

Permalink
fix(migrateTenant): clear groups of newly created assets
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-mauran committed Sep 29, 2023
1 parent e249f13 commit 79f6a5a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/modules/asset/AssetService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,18 @@ export class AssetService {
}
}
});

// clear the groups
await this.sdk.document.mUpdate<AssetContent>(
newEngineId,
InternalCollection.ASSETS,
assetsList.map((assetId) => ({
_id: assetId,
body: {
groups: [],
},
}))
);
} catch (error) {
await recovery.rollback();
throw new BadRequestError(
Expand Down

0 comments on commit 79f6a5a

Please sign in to comment.