diff --git a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js index 0c8e3701ec8..882848dd295 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js @@ -631,16 +631,18 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { // check the entries in currentParams are the same as the reqParams let sameContext = true; Object.entries(currentParams).forEach(([key, value]) => { - sameContext &= key in reqParams && reqParams[key] === value; + // loose equality: will do a Number to String conversion if necessary + sameContext &= key in reqParams && reqParams[key] == value; }); return !sameContext; }, __getNextPageParams: function() { - if (this._resourcesContainer.getFlatList() && this._resourcesContainer.getFlatList().nextRequest) { + const studiesContainer = this._resourcesContainer.getFlatList(); + if (studiesContainer && studiesContainer.nextRequest) { // Context might have been changed while waiting for the response. // The new call is on the way, therefore this response can be ignored. - const url = new URL(this._resourcesContainer.getFlatList().nextRequest); + const url = new URL(studiesContainer.nextRequest); const urlSearchParams = new URLSearchParams(url.search); const urlParams = {}; for (const [snakeKey, value] of urlSearchParams.entries()) { @@ -650,12 +652,12 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { const contextChanged = this.__didContextChange(urlParams); if ( !contextChanged && - osparc.utils.Utils.hasParamFromURL(this._resourcesContainer.getFlatList().nextRequest, "offset") && - osparc.utils.Utils.hasParamFromURL(this._resourcesContainer.getFlatList().nextRequest, "limit") + osparc.utils.Utils.hasParamFromURL(studiesContainer.nextRequest, "offset") && + osparc.utils.Utils.hasParamFromURL(studiesContainer.nextRequest, "limit") ) { return { - offset: osparc.utils.Utils.getParamFromURL(this._resourcesContainer.getFlatList().nextRequest, "offset"), - limit: osparc.utils.Utils.getParamFromURL(this._resourcesContainer.getFlatList().nextRequest, "limit") + offset: osparc.utils.Utils.getParamFromURL(studiesContainer.nextRequest, "offset"), + limit: osparc.utils.Utils.getParamFromURL(studiesContainer.nextRequest, "limit") }; } } diff --git a/services/static-webserver/client/source/class/osparc/data/model/Workbench.js b/services/static-webserver/client/source/class/osparc/data/model/Workbench.js index 822f5d59eff..d442cb03b63 100644 --- a/services/static-webserver/client/source/class/osparc/data/model/Workbench.js +++ b/services/static-webserver/client/source/class/osparc/data/model/Workbench.js @@ -797,7 +797,10 @@ qx.Class.define("osparc.data.model.Workbench", { } else { // patch only what was changed Object.keys(workbenchDiffs[nodeId]).forEach(changedFieldKey => { - patchData[changedFieldKey] = nodeData[changedFieldKey]; + if (nodeData[changedFieldKey] !== undefined) { + // do not patch if it's undefined + patchData[changedFieldKey] = nodeData[changedFieldKey]; + } }); } const params = { @@ -807,7 +810,9 @@ qx.Class.define("osparc.data.model.Workbench", { }, data: patchData }; - promises.push(osparc.data.Resources.fetch("studies", "patchNode", params)); + if (Object.keys(patchData).length) { + promises.push(osparc.data.Resources.fetch("studies", "patchNode", params)); + } }) return Promise.all(promises); }