diff --git a/lib/galaxy/model/__init__.py b/lib/galaxy/model/__init__.py index fa8f2bc8f712..2c8dae330d83 100644 --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -6049,7 +6049,7 @@ def __init__( self.user = user def to_history_dataset_association( - self, target_history, parent_id=None, add_to_history=False, visible=None, flush=True + self, target_history, parent_id=None, add_to_history=False, visible=None, commit=True ): sa_session = object_session(self) hda = HistoryDatasetAssociation( @@ -6075,9 +6075,9 @@ def to_history_dataset_association( hda.metadata = self.metadata if add_to_history and target_history: target_history.stage_addition(hda) - if flush: + if commit: target_history.add_pending_items() - if flush: + if commit: with transaction(sa_session): sa_session.commit() return hda diff --git a/lib/galaxy/webapps/galaxy/services/history_contents.py b/lib/galaxy/webapps/galaxy/services/history_contents.py index 728de0ab0c8a..f874b0a71749 100644 --- a/lib/galaxy/webapps/galaxy/services/history_contents.py +++ b/lib/galaxy/webapps/galaxy/services/history_contents.py @@ -1174,7 +1174,7 @@ def traverse(folder): hdas = [ ld.library_dataset_dataset_association.to_history_dataset_association( - history, add_to_history=True, flush=False + history, add_to_history=True, commit=False ) for ld in traverse(folder) ]