mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 12:13:33 +08:00
Bugfix: Yet another bug fix for workflow extraction with collection operations.
Fail, fail, fail.
This commit is contained in:
@@ -2864,6 +2864,13 @@ class DatasetCollectionElement( object, Dictifiable ):
|
||||
def dataset( self ):
|
||||
return self.dataset_instance.dataset
|
||||
|
||||
def first_dataset_instance( self ):
|
||||
element_object = self.element_object
|
||||
if isinstance( element_object, DatasetCollection ):
|
||||
return element_object.dataset_instances[ 0 ]
|
||||
else:
|
||||
return element_object
|
||||
|
||||
def copy_to_collection( self, collection ):
|
||||
new_element = DatasetCollectionElement(
|
||||
element=self.element_object,
|
||||
|
||||
@@ -293,6 +293,8 @@ def __cleanup_param_values( inputs, values ):
|
||||
# HACK: Nested associations are not yet working, but we
|
||||
# still need to clean them up so we can serialize
|
||||
# if not( prefix ):
|
||||
if isinstance( tmp, model.DatasetCollectionElement ):
|
||||
tmp = tmp.first_dataset_instance()
|
||||
if tmp: # this is false for a non-set optional dataset
|
||||
if not isinstance(tmp, list):
|
||||
associations.append( ( tmp.hid, prefix + key ) )
|
||||
|
||||
Reference in New Issue
Block a user