Small optimization for implicit collection creation from tool execution.

Don't write out encode identifier, add to dict, and then reload object in dataset collection service - just pass through the object in the dictionary as is.
This commit is contained in:
John Chilton
2014-09-03 08:43:25 -04:00
parent f75a932c3a
commit fcb552bc85
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -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,
+1 -1
View File
@@ -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 ): ]