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 13, 2024
1 parent dfe9937 commit 8c8dd34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/galaxy/tools/parameters/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2740,6 +2740,7 @@ def raw_to_galaxy(app: "MinimalApp", history: "History", as_dict_value: Dict[str
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 @@ -2756,7 +2757,8 @@ 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()
app.model.session.add(hdca)
history.stage_addition(hdca)
history.add_pending_items()
app.model.session.flush()
return hdca

Expand Down

0 comments on commit 8c8dd34

Please sign in to comment.