Skip to content

Commit 1f27184

Browse files
author
Vikas Agarwal
committed
Added more exception fields for skipping the merge to avoid absolute keys in the updated JSON.
1 parent b5b574c commit 1f27184

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/routes/projectTemplates/update.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ module.exports = [
6464
}
6565

6666
// Merge JSON fields
67-
entityToUpdate.scope = util.mergeJsonObjects(projectTemplate.scope, entityToUpdate.scope, ['priceConfig']);
67+
entityToUpdate.scope = util.mergeJsonObjects(
68+
projectTemplate.scope,
69+
entityToUpdate.scope,
70+
['priceConfig', 'addonPriceConfig', 'preparedConditions', 'buildingBlocks']
71+
);
6872
entityToUpdate.phases = util.mergeJsonObjects(projectTemplate.phases, entityToUpdate.phases);
6973
// removes null phase templates
7074
entityToUpdate.phases = _.omitBy(entityToUpdate.phases, _.isNull);

0 commit comments

Comments
 (0)