Reverting when cancelling out of edits works for both legacy and new object providers (#3435)

* Update persistence capability to use object api get
* Getting objects using the legacy object service provider will use the defaultSpace if necessary
This commit is contained in:
Shefali Joshi
2020-10-08 16:48:26 -07:00
committed by GitHub
parent 631876cab3
commit b6e0208e71
5 changed files with 31 additions and 13 deletions

View File

@@ -153,10 +153,11 @@ define(["objectUtils"],
return this.$q.when(true);
}
return this.persistenceService.readObject(
this.getSpace(),
this.getKey()
).then(updateModel);
return this.openmct.objects.get(domainObject.getId()).then((newStyleObject) => {
let oldStyleObject = this.openmct.legacyObject(newStyleObject);
return updateModel(oldStyleObject.getModel());
});
};
/**