mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix inconsistency in update state handling for tool modules
This commit is contained in:
@@ -1661,12 +1661,6 @@ class Tool( object, Dictifiable ):
|
||||
tool_model[ 'inputs' ] = {}
|
||||
populate_model( self.inputs, state_inputs, tool_model[ 'inputs' ] )
|
||||
|
||||
# sanitize tool state
|
||||
def value_to_basic( input, value, parent, **kwargs ):
|
||||
parent[ input.name ] = input.value_to_basic( value, self.app )
|
||||
|
||||
visit_input_values( self.inputs, state_inputs, value_to_basic )
|
||||
|
||||
# create tool help
|
||||
tool_help = ''
|
||||
if self.help:
|
||||
@@ -1692,7 +1686,7 @@ class Tool( object, Dictifiable ):
|
||||
'versions' : tool_versions,
|
||||
'requirements' : [ { 'name' : r.name, 'version' : r.version } for r in self.requirements ],
|
||||
'errors' : state_errors,
|
||||
'state_inputs' : state_inputs,
|
||||
'state_inputs' : params_to_strings( self.inputs, state_inputs, self.app ),
|
||||
'job_id' : trans.security.encode_id( job.id ) if job else None,
|
||||
'job_remap' : self._get_job_remap( job ),
|
||||
'history_id' : trans.security.encode_id( history.id ),
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"""
|
||||
Modules used in building workflows
|
||||
"""
|
||||
import copy
|
||||
import logging
|
||||
from json import dumps, loads
|
||||
from xml.etree.ElementTree import Element
|
||||
@@ -965,11 +964,8 @@ class ToolModule( WorkflowModule ):
|
||||
input_dicts.append( { "name": name, "description": "runtime parameter for tool %s" % self.get_name() } )
|
||||
return input_dicts
|
||||
|
||||
def get_post_job_actions( self, incoming=None):
|
||||
if incoming is None:
|
||||
return self.post_job_actions
|
||||
else:
|
||||
return ActionBox.handle_incoming(incoming)
|
||||
def get_post_job_actions( self, incoming ):
|
||||
return ActionBox.handle_incoming( incoming )
|
||||
|
||||
def get_config_form( self ):
|
||||
self.add_dummy_datasets()
|
||||
@@ -977,8 +973,7 @@ class ToolModule( WorkflowModule ):
|
||||
tool=self.tool, values=self.state.inputs, errors=( self.errors or {} ) )
|
||||
|
||||
def update_state( self, incoming ):
|
||||
self.label = incoming.get( 'label' )
|
||||
self.state.inputs = copy.deepcopy( incoming )
|
||||
self.recover_state( incoming )
|
||||
|
||||
def check_and_update_state( self ):
|
||||
inputs = self.state.inputs
|
||||
|
||||
Reference in New Issue
Block a user