Skip to content

Commit

Permalink
🐛 [Frontend] Fix: Do not listen to output related backend updates if …
Browse files Browse the repository at this point in the history
…the node is a frontend node (#6434)

Co-authored-by: Dustin Kaiser <[email protected]>
  • Loading branch information
2 people authored and matusdrobuliak66 committed Sep 24, 2024
1 parent cd8a2b8 commit f4e1ec5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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"]);
Expand Down

0 comments on commit f4e1ec5

Please sign in to comment.