mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
ToolForm: Replace default value after validation
This commit is contained in:
@@ -2405,9 +2405,7 @@ class Tool( object, Dictifiable ):
|
||||
pass
|
||||
group_state[input.test_param.name] = value
|
||||
else:
|
||||
default_value = incoming.get(key, None)
|
||||
if not default_value:
|
||||
default_value = state[input.name]
|
||||
default_value = incoming.get(key, state.get(input.name, None))
|
||||
value, error = check_state(trans, input, default_value, context)
|
||||
if error:
|
||||
errors[key] = error
|
||||
@@ -2458,7 +2456,11 @@ class Tool( object, Dictifiable ):
|
||||
# sanitize values
|
||||
sanitize(tool_dict, 'value')
|
||||
sanitize(tool_dict, 'default_value')
|
||||
|
||||
|
||||
# use default value
|
||||
if not tool_dict['value']:
|
||||
tool_dict['value'] = tool_dict['default_value']
|
||||
|
||||
# backup final input dictionary
|
||||
group_inputs[input_index] = tool_dict
|
||||
|
||||
|
||||
Reference in New Issue
Block a user