Skip to content

Commit

Permalink
Fix failing API tests for explicit collection outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Aug 2, 2017
1 parent 46fba6e commit ea15f39
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions lib/galaxy/tools/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,19 @@ def create_output_collections( self, trans, history, params ):
continue
output = self.tool.outputs[ output_name ]

# Switch the structure for outputs if the output specified a default_identifier_source
collection_type_descriptions = trans.app.dataset_collections_service.collection_type_descriptions
_structure = None
source_collection = self.collection_info.collections.get(output.default_identifier_source)
if source_collection:
collection_type_description = collection_type_descriptions.for_collection_type(source_collection.collection.collection_type)
_structure = structure.for_dataset_collection( source_collection.collection, collection_type_description=collection_type_description)
if _structure and structure.can_match(_structure):
element_identifiers = _structure.element_identifiers_for_outputs(trans, outputs)
else:
element_identifiers = None
if hasattr(output, "default_identifier_source"):
# Switch the structure for outputs if the output specified a default_identifier_source
collection_type_descriptions = trans.app.dataset_collections_service.collection_type_descriptions

source_collection = self.collection_info.collections.get(output.default_identifier_source)
if source_collection:
collection_type_description = collection_type_descriptions.for_collection_type(source_collection.collection.collection_type)
_structure = structure.for_dataset_collection( source_collection.collection, collection_type_description=collection_type_description)
if structure.can_match(_structure):
element_identifiers = _structure.element_identifiers_for_outputs(trans, outputs)

if not element_identifiers:
element_identifiers = structure.element_identifiers_for_outputs( trans, outputs )

implicit_collection_info = dict(
Expand Down

0 comments on commit ea15f39

Please sign in to comment.