From 9860ebeeea2beabdb31f80d9c320cfc1ae3283d8 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 21 Sep 2023 12:52:54 +0200 Subject: [PATCH] Also copy contents to history when send to new history is active --- lib/galaxy/workflow/run_request.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/workflow/run_request.py b/lib/galaxy/workflow/run_request.py index 37670ead736c..e6ade4609703 100644 --- a/lib/galaxy/workflow/run_request.py +++ b/lib/galaxy/workflow/run_request.py @@ -14,6 +14,7 @@ EffectiveOutput, History, HistoryDatasetAssociation, + HistoryDatasetCollectionAssociation, LibraryDataset, LibraryDatasetDatasetAssociation, WorkflowInvocation, @@ -400,7 +401,10 @@ def build_workflow_run_configs( f"Unknown workflow input source '{input_source}' specified." ) if add_to_history and content.history != history: - content = content.copy(flush=False) + if isinstance(content, HistoryDatasetCollectionAssociation): + content = content.copy(element_destination=history, flush=False) + else: + content = content.copy(flush=False) history.stage_addition(content) input_dict["content"] = content except AssertionError: