Since we're observing for changes to the conditionSet domain object, we don't need to re-fetch it with persist.

This commit is contained in:
Joshi 2020-03-16 10:50:11 -07:00
parent 41c79c6032
commit 94b5617e63

View File

@ -214,14 +214,7 @@ export default class ConditionManager extends EventEmitter {
}
persistConditions() {
this.openmct.objects.get(this.conditionSetDomainObject.identifier).then((conditionSetDomainObject) => {
let conditionCollection = this.conditionSetDomainObject.configuration.conditionCollection;
//we want to keep our copy of the conditionSet domain object in sync
this.conditionSetDomainObject = conditionSetDomainObject;
//but we want to ensure that the conditionCollection we have is the latest
this.conditionSetDomainObject.configuration.conditionCollection = conditionCollection;
this.openmct.objects.mutate(this.conditionSetDomainObject, 'configuration.conditionCollection', this.conditionSetDomainObject.configuration.conditionCollection);
});
this.openmct.objects.mutate(this.conditionSetDomainObject, 'configuration.conditionCollection', this.conditionSetDomainObject.configuration.conditionCollection);
}
destroy() {