Skip to content

Commit dff90b6

Browse files
committed
first move to workspace, then move to folder
1 parent ae86609 commit dff90b6

File tree

1 file changed

+4
-8
lines changed
  • services/static-webserver/client/source/class/osparc/dashboard

1 file changed

+4
-8
lines changed

services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -576,10 +576,8 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
576576
const destWorkspaceId = data["workspaceId"];
577577
const destFolderId = data["folderId"];
578578
const moveFolder = () => {
579-
Promise.all([
580-
this.__moveFolderToWorkspace(folderId, destWorkspaceId),
581-
this.__moveFolderToFolder(folderId, destFolderId),
582-
])
579+
this.__moveFolderToWorkspace(folderId, destWorkspaceId) // first move to workspace
580+
.then(this.__moveFolderToFolder(folderId, destFolderId)) // then move to folder
583581
.then(() => this.__reloadFolders())
584582
.catch(err => console.error(err));
585583
}
@@ -1243,10 +1241,8 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
12431241
const selection = this._resourcesContainer.getSelection();
12441242
selection.forEach(button => {
12451243
const studyData = button.getResourceData();
1246-
Promise.all([
1247-
this.__moveStudyToWorkspace(studyData, destWorkspaceId),
1248-
this.__moveStudyToFolder(studyData, destFolderId),
1249-
])
1244+
this.__moveStudyToWorkspace(studyData, destWorkspaceId) // first move to workspace
1245+
.then(() => this.__moveStudyToFolder(studyData, destFolderId)) // then move to folder
12501246
.then(() => this.__removeFromStudyList(studyData["uuid"]))
12511247
.catch(err => {
12521248
console.error(err);

0 commit comments

Comments
 (0)