Skip to content

Commit

Permalink
Only update the operation code if not reserved attribute. Fix #1726 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
brollb authored Jun 5, 2020
1 parent b6112c7 commit 51dbb02
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
define([
'panels/EasyDAG/EasyDAGControl.WidgetEventHandlers',
'deepforge/OperationCode',
'deepforge/Constants',
'./Colors',
'text!panels/ForgeActionButton/Libraries.json',
], function(
EasyDAGControlEventHandlers,
OperationCode,
Constants,
COLORS,
LibrariesText
) {
Expand Down Expand Up @@ -265,7 +267,10 @@ define([
} else if (nodeId === this._currentNodeId) { // edit operation attributes
msg = `Setting attribute default ${attr}->${value} in ${name}`;
this._client.startTransaction(msg);
this.updateCode(operation => operation.setAttributeDefault(attr, value));
const isOperationAttribute = !Object.values(Constants.OPERATION).includes(attr);
if (isOperationAttribute) {
this.updateCode(operation => operation.setAttributeDefault(attr, value));
}
EasyDAGControlEventHandlers.prototype._saveAttributeForNode.apply(this, arguments);
this._client.completeTransaction();
}
Expand Down

0 comments on commit 51dbb02

Please sign in to comment.