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: