Bugfix: Yet another bug fix for workflow extraction with collection operations.

Fail, fail, fail.
This commit is contained in:
John Chilton
2014-05-14 18:25:50 -05:00
parent d6cea61cc5
commit bdab215a8d
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -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,
+2
View File
@@ -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 ) )