Skip to content

Commit

Permalink
Rename flush in to_history_dataset_association to commit
Browse files Browse the repository at this point in the history
  • Loading branch information
arash77 committed Oct 10, 2024
1 parent 5e924cc commit 4bf029b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/services/history_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
]
Expand Down

0 comments on commit 4bf029b

Please sign in to comment.