From 9b77192f1c5d14e51888ea14b3d6a68fd62aeb43 Mon Sep 17 00:00:00 2001 From: Odei Maiz Date: Tue, 24 Sep 2024 15:09:37 +0200 Subject: [PATCH] Do not listen to output related backend updates if the node is a frontend node --- .../client/source/class/osparc/data/model/Study.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/static-webserver/client/source/class/osparc/data/model/Study.js b/services/static-webserver/client/source/class/osparc/data/model/Study.js index 4b7c879bb53..c62549bcc63 100644 --- a/services/static-webserver/client/source/class/osparc/data/model/Study.js +++ b/services/static-webserver/client/source/class/osparc/data/model/Study.js @@ -435,6 +435,7 @@ qx.Class.define("osparc.data.model.Study", { }); }, + // Used for updating some node data through the "nodeUpdated" websocket event nodeUpdated: function(nodeUpdatedData) { const studyId = nodeUpdatedData["project_id"]; if (studyId !== this.getUuid()) { @@ -444,7 +445,10 @@ qx.Class.define("osparc.data.model.Study", { const nodeData = nodeUpdatedData["data"]; const workbench = this.getWorkbench(); const node = workbench.getNode(nodeId); - if (node && nodeData) { + // Do not listen to output related backend updates if the node is a frontend node. + // The frontend controls its output values, progress and states. + // If a File Picker is uploading a file, the backend could override the current state with some older state. + if (node && nodeData && !osparc.data.model.Node.isFrontend(node)) { node.setOutputData(nodeData.outputs); if ("progress" in nodeData) { const progress = Number.parseInt(nodeData["progress"]);