From 7fb7a5452fd07c57be767ecdb7acdfaaad445bee Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Tue, 26 Apr 2016 16:43:52 -0700 Subject: [PATCH] [Persistence] Remove persistence usage from Edit Properties --- .../edit/src/actions/PropertiesAction.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/platform/commonUI/edit/src/actions/PropertiesAction.js b/platform/commonUI/edit/src/actions/PropertiesAction.js index 1134c23190..288002386c 100644 --- a/platform/commonUI/edit/src/actions/PropertiesAction.js +++ b/platform/commonUI/edit/src/actions/PropertiesAction.js @@ -52,12 +52,6 @@ define( domainObject = this.domainObject, dialogService = this.dialogService; - // Persist modifications to this domain object - function doPersist() { - var persistence = domainObject.getCapability('persistence'); - return persistence && persistence.persist(); - } - // Update the domain object model based on user input function updateModel(userInput, dialog) { return domainObject.useCapability('mutation', function (model) { @@ -75,11 +69,9 @@ define( dialog.getFormStructure(), dialog.getInitialFormValue() ).then(function (userInput) { - // Update the model, if user input was provided - return userInput && updateModel(userInput, dialog); - }).then(function (result) { - return result && doPersist(); - }); + // Update the model, if user input was provided + return userInput && updateModel(userInput, dialog); + }); } return type && showDialog(type); @@ -96,9 +88,7 @@ define( creatable = type && type.hasFeature('creation'); // Only allow creatable types to be edited - return domainObject && - domainObject.hasCapability("persistence") && - creatable; + return domainObject && creatable; }; return PropertiesAction;