Skip to content

Commit

Permalink
Fix addition of default collection to history
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed May 14, 2024
1 parent fa3ef46 commit 2950ae6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/galaxy/tools/parameters/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2737,6 +2737,7 @@ def raw_to_galaxy(trans, as_dict_value):
name=name,
collection=collection,
)
app.model.session.add(hdca)

def write_elements_to_collection(has_elements, collection_builder):
element_dicts = has_elements.get("elements")
Expand All @@ -2753,8 +2754,9 @@ def write_elements_to_collection(has_elements, collection_builder):
collection_builder = builder.BoundCollectionBuilder(collection)
write_elements_to_collection(as_dict_value, collection_builder)
collection_builder.populate()
trans.sa_session.add(hdca)
trans.sa_session.flush()
history.stage_addition(hdca)
history.add_pending_items()
app.model.session.flush()
return hdca


Expand Down

0 comments on commit 2950ae6

Please sign in to comment.