Skip to content

Commit e71fbac

Browse files
committed
isAnyLinkedNodeMissing
1 parent 1bd6308 commit e71fbac

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

services/static-webserver/client/source/class/osparc/desktop/MainPageHandler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ qx.Class.define("osparc.desktop.MainPageHandler", {
102102
throw new Error(msg);
103103
}
104104

105-
// check if it's corrupt
106-
if (osparc.study.Utils.isCorrupt(studyData)) {
105+
// check if there is any linked node missing
106+
if (osparc.study.Utils.isAnyLinkedNodeMissing(studyData)) {
107107
const msg = `${qx.locale.Manager.tr("We encountered an issue with the")} ${studyAlias} <br>${qx.locale.Manager.tr("Please contact support.")}`;
108108
throw new Error(msg);
109109
}

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,13 @@ qx.Class.define("osparc.study.Utils", {
2323
type: "static",
2424

2525
statics: {
26-
__isAnyLinkedNodeMissing: function(studyData) {
26+
isAnyLinkedNodeMissing: function(studyData) {
2727
const existingNodeIds = Object.keys(studyData["workbench"]);
2828
const linkedNodeIds = osparc.data.model.Workbench.getLinkedNodeIds(studyData["workbench"]);
2929
const allExist = linkedNodeIds.every(linkedNodeId => existingNodeIds.includes(linkedNodeId));
3030
return !allExist;
3131
},
3232

33-
isCorrupt: function(studyData) {
34-
return this.__isAnyLinkedNodeMissing(studyData);
35-
},
36-
3733
extractUniqueServices: function(workbench) {
3834
const services = new Set([]);
3935
Object.values(workbench).forEach(srv => {

0 commit comments

Comments
 (0)