Remove RuntimeValue arrays

This commit is contained in:
guerler
2016-03-10 14:17:18 -05:00
parent 773095d403
commit b1a9823a3c
2 changed files with 2 additions and 13 deletions
-2
View File
@@ -1670,7 +1670,6 @@ class BaseDataToolParameter( ToolParameter ):
self.is_dynamic = self.options is not None
def to_json( self, value, app ):
def single_to_json( value ):
src = None
if isinstance( value, galaxy.model.DatasetCollectionElement ):
@@ -1680,7 +1679,6 @@ class BaseDataToolParameter( ToolParameter ):
else:
src = 'hda'
return { 'id' : app.security.encode_id( value.id ), 'src' : src }
if value is not None:
if isinstance( value, list ) and len( value ) > 0:
values = [ single_to_json( v ) for v in value ]
+2 -11
View File
@@ -1141,19 +1141,10 @@ class ToolModule( WorkflowModule ):
input_connections_by_name = {}
# Any connected input needs to have value RuntimeValue (these
# are not persisted so we need to do it every time)
def callback( input, prefixed_name, **kwargs ):
replacement = None
if isinstance( input, DataToolParameter ):
if isinstance( input, DataToolParameter ) or isinstance( input, DataCollectionToolParameter ):
if connections is None or prefixed_name in input_connections_by_name:
if input.multiple:
replacement = [] if not connections else [RuntimeValue() for conn in connections]
else:
replacement = RuntimeValue()
elif isinstance( input, DataCollectionToolParameter ):
if connections is None or prefixed_name in input_connections_by_name:
replacement = RuntimeValue()
return replacement
return RuntimeValue()
visit_input_values( self.tool.inputs, self.state.inputs, callback )