mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Explicitly pass history into DatasetCollectionManager.create
This commit is contained in:
@@ -201,7 +201,6 @@ class DatasetCollectionManager:
|
||||
has_subcollections = collection_type_description.has_subcollections()
|
||||
# If we have elements, this is an internal request, don't need to load
|
||||
# objects from identifiers.
|
||||
history = history or trans.history
|
||||
if elements is None:
|
||||
elements = self._element_identifiers_to_elements(trans,
|
||||
collection_type_description=collection_type_description,
|
||||
@@ -209,7 +208,8 @@ class DatasetCollectionManager:
|
||||
hide_source_items=hide_source_items,
|
||||
copy_elements=copy_elements,
|
||||
history=history)
|
||||
history.add_pending_items()
|
||||
if history:
|
||||
history.add_pending_items()
|
||||
else:
|
||||
if has_subcollections:
|
||||
# Nested collection - recursively create collections as needed.
|
||||
|
||||
@@ -42,7 +42,7 @@ class DatasetCollectionsController(
|
||||
|
||||
:type payload: dict
|
||||
:param payload: (optional) dictionary structure containing:
|
||||
* collection_type: dataset colltion type to create.
|
||||
* collection_type: dataset collection type to create.
|
||||
* instance_type: Instance type - 'history' or 'library'.
|
||||
* name: the new dataset collections's name
|
||||
* datasets: object describing datasets for collection
|
||||
@@ -57,6 +57,7 @@ class DatasetCollectionsController(
|
||||
history_id = decode_id(self.app, history_id)
|
||||
history = self.history_manager.get_owned(history_id, trans.user, current_history=trans.history)
|
||||
create_params["parent"] = history
|
||||
create_params["history"] = history
|
||||
elif instance_type == "library":
|
||||
folder_id = payload.get('folder_id')
|
||||
library_folder = self.get_library_folder(trans, folder_id, check_accessible=True)
|
||||
|
||||
Reference in New Issue
Block a user