commit/galaxy-central: dan: Fix for params_to_incoming.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/982b9522efca/ changeset: 982b9522efca user: dan date: 2012-11-08 03:06:54 summary: Fix for params_to_incoming. affected #: 2 files diff -r ec51a727a497d5912fdd4269571d7c26d7523436 -r 982b9522efca2abf46637870e06c7abf1204be6d lib/galaxy/tools/parameters/__init__.py --- a/lib/galaxy/tools/parameters/__init__.py +++ b/lib/galaxy/tools/parameters/__init__.py @@ -115,5 +115,5 @@ incoming[ new_name_prefix + input.test_param.name ] = values[ input.test_param.name ] params_to_incoming( incoming, input.cases[current].inputs, values, app, new_name_prefix ) else: - incoming[ name_prefix + input.name ] = input.to_string( input_values.get( input.name ), app ) + incoming[ name_prefix + input.name ] = input.to_html_value( input_values.get( input.name ), app ) diff -r ec51a727a497d5912fdd4269571d7c26d7523436 -r 982b9522efca2abf46637870e06c7abf1204be6d lib/galaxy/tools/parameters/basic.py --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -106,6 +106,10 @@ """ return value + def to_html_value( self, value, app ): + """Convert an object value to the value expected from an html post""" + return self.to_string( value, app ) + def to_string( self, value, app ): """Convert a value to a string representation suitable for persisting""" return str( value ) @@ -370,6 +374,11 @@ return form_builder.CheckboxField( self.name, checked, refresh_on_change = self.refresh_on_change ) def from_html( self, value, trans=None, other_values={} ): return form_builder.CheckboxField.is_checked( value ) + def to_html_value( self, value, app ): + if value: + return [ 'true', 'true' ] + else: + return [ 'true' ] def to_python( self, value, app ): return ( value == 'True' ) def get_initial_value( self, trans, context ): Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket