Skip to content

Commit

Permalink
🐛 [Frontend] Fix Service listing helpers (#6138)
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz authored Aug 5, 2024
1 parent c858019 commit b409bf2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
Expand All @@ -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;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit b409bf2

Please sign in to comment.