Skip to content

Commit aba75de

Browse files
committed
patchFunction
1 parent d6488ae commit aba75de

File tree

1 file changed

+9
-1
lines changed
  • services/static-webserver/client/source/class/osparc/data/model

1 file changed

+9
-1
lines changed

services/static-webserver/client/source/class/osparc/data/model/Function.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,15 @@ qx.Class.define("osparc.data.model.Function", {
165165
},
166166

167167
patchFunction: function(functionChanges) {
168-
return osparc.store.Functions.patchFunction(this.getUuid(), functionChanges);
168+
return osparc.store.Functions.patchFunction(this.getUuid(), functionChanges)
169+
.then(functionData => {
170+
Object.keys(functionChanges).forEach(fieldKey => {
171+
const upKey = qx.lang.String.firstUp(fieldKey);
172+
const setter = "set" + upKey;
173+
this[setter](functionChanges[fieldKey]);
174+
});
175+
return functionData;
176+
});
169177
},
170178
}
171179
});

0 commit comments

Comments
 (0)