diff --git a/lib/galaxy/dataset_collections/__init__.py b/lib/galaxy/dataset_collections/__init__.py index e50f3cab0f6..9419c5cc037 100644 --- a/lib/galaxy/dataset_collections/__init__.py +++ b/lib/galaxy/dataset_collections/__init__.py @@ -54,8 +54,12 @@ class DatasetCollectionsService( ): """ """ - if element_identifiers: + # Trust embedded, newly created objects created by tool subsystem. + trusted_identifiers = implicit_collection_info is not None + + if element_identifiers and not trusted_identifiers: validate_input_element_identifiers( element_identifiers ) + dataset_collection = self.__create_dataset_collection( trans=trans, collection_type=collection_type, diff --git a/lib/galaxy/dataset_collections/structure.py b/lib/galaxy/dataset_collections/structure.py index 917ec1698ff..c21bdc9327a 100644 --- a/lib/galaxy/dataset_collections/structure.py +++ b/lib/galaxy/dataset_collections/structure.py @@ -78,7 +78,7 @@ class Tree( object ): child_identifiers[ "name" ] = identifier element_identifiers.append( child_identifiers ) else: - element_identifiers.append( dict( name=identifier, src="hda", id=trans.security.encode_id( datasets[ 0 ].id ) ) ) + element_identifiers.append( dict( name=identifier, __object__=datasets[ 0 ] ) ) datasets = datasets[ len( child ): ]