Skip to content

Commit 1469801

Browse files
committed
checkExposedInputsOutputs
1 parent 4f251cd commit 1469801

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

services/static-webserver/client/source/class/osparc/study/CreateFunction.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ qx.Class.define("osparc.study.CreateFunction", {
5656
dynamics.length === 0
5757
);
5858
},
59+
60+
checkExposedInputsOutputs: function(exposedInputs, exposedOutputs) {
61+
console.log("Exposed inputs:", exposedInputs);
62+
console.log("Exposed outputs:", exposedOutputs);
63+
return true;
64+
},
5965
},
6066

6167
members: {
@@ -264,6 +270,12 @@ qx.Class.define("osparc.study.CreateFunction", {
264270
},
265271

266272
__createFunction: function(defaultInputs, exposedInputs, exposedOutputs) {
273+
if (!osparc.study.CreateFunction.checkExposedInputsOutputs(exposedInputs, exposedOutputs)) {
274+
const msg = this.tr("Exposed at least one input or output");
275+
osparc.FlashMessenger.logAs(msg, "ERROR");
276+
return;
277+
}
278+
267279
this.__createFunctionBtn.setFetching(true);
268280

269281
// first publish it as a hidden template

0 commit comments

Comments
 (0)