Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task/1967 remove folder info from sub-contentblocks in assets to avoid deployment blockers #1968

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading