diff --git a/lib/metadataTypes/Asset.js b/lib/metadataTypes/Asset.js index 293d7814c..30c6998fe 100644 --- a/lib/metadataTypes/Asset.js +++ b/lib/metadataTypes/Asset.js @@ -571,7 +571,7 @@ class Asset extends MetadataType { // get template try { if (metadata.views?.html?.template?.id) { - metadata.views.html.template.r__assetTemplate_Key = cache.searchForField( + metadata.views.html.template.r__asset_customerKey = cache.searchForField( 'asset', metadata.views?.html?.template?.id, 'id', @@ -688,18 +688,18 @@ class Asset extends MetadataType { // template-based emails if ( metadata.assetType.name === 'templatebasedemail' && - metadata.views?.html?.template?.r__assetTemplate_Key + metadata.views?.html?.template?.r__asset_customerKey ) { // template metadata.views.html.template.id = cache.searchForField( 'asset', - metadata.views.html.template.r__assetTemplate_Key, + metadata.views.html.template.r__asset_customerKey, 'customerKey', 'id' ); metadata.views.html.template.name = cache.searchForField( 'asset', - metadata.views.html.template.r__assetTemplate_Key, + metadata.views.html.template.r__asset_customerKey, 'customerKey', 'name' ); @@ -715,7 +715,7 @@ class Asset extends MetadataType { metadata.views.html.template.availableViews = []; metadata.views.html.template.modelVersion = 2; - delete metadata.views.html.template.r__assetTemplate_Key; + delete metadata.views.html.template.r__asset_customerKey; } // restore asset type id which is needed for deploy diff --git a/test/resources/9999999/asset/build-templatebasedemail-expected.json b/test/resources/9999999/asset/build-templatebasedemail-expected.json index 6e32c69e0..dfd718fdb 100644 --- a/test/resources/9999999/asset/build-templatebasedemail-expected.json +++ b/test/resources/9999999/asset/build-templatebasedemail-expected.json @@ -60,7 +60,7 @@ "availableViews": [], "template": { "meta": { "contentHash": -166410261 }, - "r__assetTemplate_Key": "testTemplated_asset_template" + "r__asset_customerKey": "testTemplated_asset_template" }, "data": { "email": { "options": { "generateFrom": null } } }, "modelVersion": 2 diff --git a/test/resources/9999999/asset/retrieve-templatebasedemail-expected.json b/test/resources/9999999/asset/retrieve-templatebasedemail-expected.json index 1bfc09130..ddd1c9593 100644 --- a/test/resources/9999999/asset/retrieve-templatebasedemail-expected.json +++ b/test/resources/9999999/asset/retrieve-templatebasedemail-expected.json @@ -63,7 +63,7 @@ "availableViews": [], "template": { "meta": { "contentHash": -166410261 }, - "r__assetTemplate_Key": "testExisting_asset_template" + "r__asset_customerKey": "testExisting_asset_template" }, "data": { "email": { "options": { "generateFrom": null } } }, "modelVersion": 2 diff --git a/test/resources/9999999/asset/template-templatebasedemail-expected.json b/test/resources/9999999/asset/template-templatebasedemail-expected.json index 8fc42da8a..902e414ed 100644 --- a/test/resources/9999999/asset/template-templatebasedemail-expected.json +++ b/test/resources/9999999/asset/template-templatebasedemail-expected.json @@ -60,7 +60,7 @@ "availableViews": [], "template": { "meta": { "contentHash": -166410261 }, - "r__assetTemplate_Key": "{{{prefix}}}asset_template" + "r__asset_customerKey": "{{{prefix}}}asset_template" }, "data": { "email": { "options": { "generateFrom": null } } }, "modelVersion": 2