From 69b6f8afa96ba3b34b4bd08a4ea69cf712d72ef0 Mon Sep 17 00:00:00 2001 From: Andrew Henry Date: Tue, 24 Sep 2019 16:31:54 -0700 Subject: [PATCH] Delete persisted timestamp (#2506) --- .../import-export/src/actions/ImportAsJSONAction.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/platform/import-export/src/actions/ImportAsJSONAction.js b/platform/import-export/src/actions/ImportAsJSONAction.js index ed20af2149..bce8aada06 100644 --- a/platform/import-export/src/actions/ImportAsJSONAction.js +++ b/platform/import-export/src/actions/ImportAsJSONAction.js @@ -64,7 +64,11 @@ define(['zepto', '../../../../src/api/objects/object-utils.js'], function ($, ob var tree = this.generateNewIdentifiers(objTree, namespace); var rootId = tree.rootId; - var rootObj = this.instantiate(tree.openmct[rootId], rootId); + + var rootModel = tree.openmct[rootId]; + delete rootModel.persisted; + + var rootObj = this.instantiate(rootModel, rootId); var newStyleParent = parent.useCapability('adapter'); var newStyleRootObj = rootObj.useCapability('adapter'); @@ -106,7 +110,10 @@ define(['zepto', '../../../../src/api/objects/object-utils.js'], function ($, ob if (!tree[keystring] || seen.includes(keystring)) { return; } - newObj = this.instantiate(tree[keystring], keystring); + let newModel = tree[keystring]; + delete newModel.persisted; + + newObj = this.instantiate(newModel, keystring); newObj.getCapability("location") .setPrimaryLocation(tree[keystring].location); this.deepInstantiate(newObj, tree, seen);