From 94b5617e63630f334463d9325c0d83cf628fcff1 Mon Sep 17 00:00:00 2001 From: Joshi Date: Mon, 16 Mar 2020 10:50:11 -0700 Subject: [PATCH] Since we're observing for changes to the conditionSet domain object, we don't need to re-fetch it with persist. --- src/plugins/condition/ConditionManager.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/plugins/condition/ConditionManager.js b/src/plugins/condition/ConditionManager.js index f0101ded6b..143f1eeee7 100644 --- a/src/plugins/condition/ConditionManager.js +++ b/src/plugins/condition/ConditionManager.js @@ -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() {