Skip to content

Commit

Permalink
#1967: remove folder info from sub-contentblocks in assets to avoid d…
Browse files Browse the repository at this point in the history
…eployment blockers
  • Loading branch information
JoernBerkefeld committed Jan 8, 2025
1 parent db8d0d3 commit bb1b026
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion @types/lib/metadataTypes/Asset.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions lib/metadataTypes/Asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -1196,9 +1196,8 @@ class Asset extends MetadataType {
};
}
if (asset.r__folder_Path) {
// more often than not, folders get replaced but that change is not updated in the snapshot of the content block here in another contentblock
// therefore, if we couldn't resolve the folder during retrieve (and hence no r__folder_Path was set), we would also fail here
this.setFolderId(asset);
// if we convert this into a folder path then renamed folders might end up blocking deployments, therefore, we instead omit this detail from now on
delete asset.r__folder_Path;
}
await this._preDeployTasksBocks(asset);
}
Expand Down Expand Up @@ -1886,7 +1885,8 @@ class Asset extends MetadataType {
}
}
if (asset.category?.id) {
this.setFolderPath(asset, true);
// if we convert this into a folder path then renamed folders might end up blocking deployments, therefore, we instead omit this detail from now on
delete asset.category;
}

if (asset.slots) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"blocks": {
"hy6ik0ftsb4": {
"r__asset_key": "testTemplated_asset_htmlblock",
"r__folder_Path": "Content Builder",
"assetType": {
"id": 197,
"name": "htmlblock",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
"blocks": {
"hy6ik0ftsb4": {
"r__asset_key": "testExisting_asset_htmlblock",
"r__folder_Path": "Content Builder",
"assetType": {
"id": 197,
"name": "htmlblock",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"blocks": {
"hy6ik0ftsb4": {
"r__asset_key": "{{{prefix}}}asset_htmlblock",
"r__folder_Path": "Content Builder",
"assetType": {
"id": 197,
"name": "htmlblock",
Expand Down

0 comments on commit bb1b026

Please sign in to comment.