Skip to content

Commit

Permalink
Remove secondary initial value handling from basic parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Jan 24, 2017
1 parent 46fb84a commit e1f87f1
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions lib/galaxy/tools/parameters/basic.py
Expand Up @@ -885,7 +885,7 @@ def get_initial_value( self, trans, other_values ):
else:
value = None
elif len( value ) == 1:
value = value[0]
value = value[ 0 ]
return value

def value_to_display_text( self, value, app ):
Expand Down Expand Up @@ -920,15 +920,7 @@ def to_dict( self, trans, other_values={} ):
# Get options, value.
options = self.get_options( trans, other_values )
d[ 'options' ] = options
value = None
if options:
if not self.optional:
value = options[ 0 ][ 1 ]
for option in options:
if option[ 2 ]:
# Found selected option.
value = option[ 1 ]
d[ 'value' ] = value
d[ 'value' ] = self.get_initial_value( trans, other_values )
d[ 'display' ] = self.display
d[ 'multiple' ] = self.multiple
return d
Expand Down

0 comments on commit e1f87f1

Please sign in to comment.