Skip to content

Commit f4e1ec5

Browse files
odeimaizmrnicegyu11
authored andcommitted
🐛 [Frontend] Fix: Do not listen to output related backend updates if the node is a frontend node (#6434)
Co-authored-by: Dustin Kaiser <[email protected]>
1 parent cd8a2b8 commit f4e1ec5

File tree

1 file changed

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

1 file changed

+5
-1
lines changed

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ qx.Class.define("osparc.data.model.Study", {
435435
});
436436
},
437437

438+
// Used for updating some node data through the "nodeUpdated" websocket event
438439
nodeUpdated: function(nodeUpdatedData) {
439440
const studyId = nodeUpdatedData["project_id"];
440441
if (studyId !== this.getUuid()) {
@@ -444,7 +445,10 @@ qx.Class.define("osparc.data.model.Study", {
444445
const nodeData = nodeUpdatedData["data"];
445446
const workbench = this.getWorkbench();
446447
const node = workbench.getNode(nodeId);
447-
if (node && nodeData) {
448+
// Do not listen to output related backend updates if the node is a frontend node.
449+
// The frontend controls its output values, progress and states.
450+
// If a File Picker is uploading a file, the backend could override the current state with some older state.
451+
if (node && nodeData && !osparc.data.model.Node.isFrontend(node)) {
448452
node.setOutputData(nodeData.outputs);
449453
if ("progress" in nodeData) {
450454
const progress = Number.parseInt(nodeData["progress"]);

0 commit comments

Comments
 (0)