Skip to content

Commit

Permalink
Fix url validator
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Feb 2, 2016
1 parent a5c4e04 commit 5175033
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/tools/parameters/__init__.py
Expand Up @@ -44,7 +44,7 @@ def visit_input_values( inputs, input_values, callback, name_prefix="", label_pr
else:
args = {
'input' : input,
'value' : input_values[ input.name ],
'value' : input_values.get( input.name ),
'prefixed_name' : "%s%s" % ( name_prefix, input.name ),
'prefixed_label' : "%s%s" % ( label_prefix, input.label )
}
Expand Down
6 changes: 5 additions & 1 deletion lib/galaxy/tools/parameters/basic.py
Expand Up @@ -726,7 +726,11 @@ def from_html( self, value=None, trans=None, other_values={} ):
return self._get_value()

def _get_value( self ):
return url_for( self.value, qualified=True )
try:
return url_for( self.value, qualified=True )
except Exception as e:
log.debug( 'Url creation failed for "%s": %s', self.name, e )
return self.value

def to_dict( self, trans, view='collection', value_mapper=None, other_values={} ):
d = super( BaseURLToolParameter, self ).to_dict( trans )
Expand Down

0 comments on commit 5175033

Please sign in to comment.