details: http://www.bx.psu.edu/hg/galaxy/rev/635d97a3a228 changeset: 2377:635d97a3a228 user: James Taylor james@jamestaylor.org date: Tue Apr 28 14:18:21 2009 -0400 description: Fix a problem with dynamic selects depending on other dynamic selects when setting values at runtime in workflows
2 file(s) affected in this change:
lib/galaxy/tools/__init__.py lib/galaxy/tools/parameters/basic.py
diffs (43 lines):
diff -r 87885ab394a0 -r 635d97a3a228 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py Tue Apr 28 09:44:35 2009 -0400 +++ b/lib/galaxy/tools/__init__.py Tue Apr 28 14:18:21 2009 -0400 @@ -686,12 +686,12 @@ # to determine the current case test_value = input.test_param.get_initial_value( trans, context ) current_case = input.get_current_case( test_value, trans ) - # Recursively fill in state for selected case - self.fill_in_new_state( trans, input.cases[current_case].inputs, s, context ) # Store the current case in a special value s['__current_case__'] = current_case # Store the value of the test element s[ input.test_param.name ] = test_value + # Recursively fill in state for selected case + self.fill_in_new_state( trans, input.cases[current_case].inputs, s, context ) else: # `input` is just a plain parameter, get its default value state[ input.name ] = input.get_initial_value( trans, context ) diff -r 87885ab394a0 -r 635d97a3a228 lib/galaxy/tools/parameters/basic.py --- a/lib/galaxy/tools/parameters/basic.py Tue Apr 28 09:44:35 2009 -0400 +++ b/lib/galaxy/tools/parameters/basic.py Tue Apr 28 14:18:21 2009 -0400 @@ -569,6 +569,11 @@ def value_to_basic( self, value, app ): if isinstance( value, UnvalidatedValue ): return { "__class__": "UnvalidatedValue", "value": value.value } + elif isinstance( value, RuntimeValue ): + # Need to handle runtime value's ourself since delegating to the + # parent method causes the value to be turned into a string, which + # breaks multiple selection + return { "__class__": "RuntimeValue" } return value def value_from_basic( self, value, app, ignore_errors=False ): if isinstance( value, dict ) and value["__class__"] == "UnvalidatedValue": @@ -598,6 +603,9 @@ dep_value = context[ dep_name ] # Dependency on a dataset that does not yet exist if isinstance( dep_value, DummyDataset ): + return True + # Dependency on a value that has not been checked + if isinstance( dep_value, UnvalidatedValue ): return True # Dependency on a value that does not yet exist if isinstance( dep_value, RuntimeValue ):
galaxy-dev@lists.galaxyproject.org