Merge pull request #12122 from mvdbeek/fix_wf_editor_save_hang

[21.05] Make failure to save workflow dismissible
This commit is contained in:
John Chilton
2021-06-10 12:04:43 -04:00
committed by GitHub
2 changed files with 9 additions and 5 deletions
@@ -328,7 +328,11 @@ export default {
this.refactorActions = actions;
})
.catch((response) => {
this.onWorkflowError("Saving workflow failed, cannot apply requested changes...");
this.onWorkflowError("Saving workflow failed, cannot apply requested changes...", response, {
Ok: () => {
this.hideModal();
},
});
});
} else {
this.refactorActions = actions;
+4 -4
View File
@@ -1279,12 +1279,12 @@ class WorkflowContentsManager(UsesAnnotations):
uuid = step_dict.get("uuid", None)
if uuid and uuid != "None":
if uuid in discovered_uuids:
raise exceptions.DuplicatedIdentifierException("Duplicate step UUID in request.")
raise exceptions.DuplicatedIdentifierException(f"Duplicate step UUID '{uuid}' in request.")
discovered_uuids.add(uuid)
label = step_dict.get("label", None)
if label:
if label in discovered_labels:
raise exceptions.DuplicatedIdentifierException("Duplicated step label in request.")
raise exceptions.DuplicatedIdentifierException(f"Duplicated step label '{label}' in request.")
discovered_labels.add(label)
if 'workflow_outputs' in step_dict:
@@ -1297,13 +1297,13 @@ class WorkflowContentsManager(UsesAnnotations):
output_label = output_dict.get("label", None)
if output_label:
if label in discovered_output_labels:
raise exceptions.DuplicatedIdentifierException("Duplicated workflow output label in request.")
raise exceptions.DuplicatedIdentifierException(f"Duplicated workflow output label '{label}' in request.")
discovered_output_labels.add(label)
output_uuid = step_dict.get("output_uuid", None)
if output_uuid:
if output_uuid in discovered_output_uuids:
raise exceptions.DuplicatedIdentifierException("Duplicate workflow output UUID in request.")
raise exceptions.DuplicatedIdentifierException(f"Duplicate workflow output UUID '{output_uuid}' in request.")
discovered_output_uuids.add(uuid)
yield step_dict