diff --git a/services/static-webserver/client/source/class/osparc/service/Utils.js b/services/static-webserver/client/source/class/osparc/service/Utils.js index 3ed8bac5c54..3175b48c717 100644 --- a/services/static-webserver/client/source/class/osparc/service/Utils.js +++ b/services/static-webserver/client/source/class/osparc/service/Utils.js @@ -155,7 +155,9 @@ qx.Class.define("osparc.service.Utils", { const services = osparc.service.Store.servicesCached; if (key in services) { const versions = this.getVersions(key, true); - return services[key][versions[0]]; + if (versions.length) { + return services[key][versions[0]]; + } } return null; }, @@ -171,6 +173,11 @@ qx.Class.define("osparc.service.Utils", { version: canUpdateTo["version"] } } + // the provided key/version itself is the latest compatible + return { + key, + version + } } return null; }, diff --git a/services/static-webserver/client/source/class/osparc/study/Utils.js b/services/static-webserver/client/source/class/osparc/study/Utils.js index 1694aee8ec8..b0558d336b0 100644 --- a/services/static-webserver/client/source/class/osparc/study/Utils.js +++ b/services/static-webserver/client/source/class/osparc/study/Utils.js @@ -109,9 +109,6 @@ qx.Class.define("osparc.study.Utils", { createStudyFromService: function(key, version, existingStudies, newStudyLabel) { return new Promise((resolve, reject) => { - if (!version) { - version = osparc.service.Utils.getLatest(key); - } osparc.service.Store.getService(key, version) .then(metadata => { const newUuid = osparc.utils.Utils.uuidV4();