galaxy-dist commit 6838e10e5912: Fix for TextToolParameter.get_html_field when provided value is an empty string but default value specified in tool is non-empty string. Fixes issue with rerun button where if a user had input an empty string, the form displayed when rerun would have the default value from the tool and not the actual previously specified value.
# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User Daniel Blankenberg <dan@bx.psu.edu> # Date 1288818754 14400 # Node ID 6838e10e5912cec46060bda189841edba305ac1d # Parent 16bd91a548887fb0be24b981c2d66fb7ef7b1922 Fix for TextToolParameter.get_html_field when provided value is an empty string but default value specified in tool is non-empty string. Fixes issue with rerun button where if a user had input an empty string, the form displayed when rerun would have the default value from the tool and not the actual previously specified value. --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -165,10 +165,11 @@ class TextToolParameter( ToolParameter ) self.value = elem.get( 'value' ) self.area = string_as_bool( elem.get( 'area', False ) ) def get_html_field( self, trans=None, value=None, other_values={} ): + if value is None: value = self.value if self.area: - return form_builder.TextArea( self.name, self.size, value or self.value ) + return form_builder.TextArea( self.name, self.size, value ) else: - return form_builder.TextField( self.name, self.size, value or self.value ) + return form_builder.TextField( self.name, self.size, value ) def get_initial_value( self, trans, context ): return self.value
participants (1)
-
commits-noreply@bitbucket.org