Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [Frontend] Fix: Do not listen to output related backend updates if the node is a frontend node #6434

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading