Skip to content

Instantly share code, notes, and snippets.

@jmchilton
Created May 14, 2014 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmchilton/72767b794445fae63426 to your computer and use it in GitHub Desktop.
Save jmchilton/72767b794445fae63426 to your computer and use it in GitHub Desktop.
validate_new_state.patch
diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py
index fe0cc04..a32f571 100755
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -1950,9 +1950,10 @@ class Tool( object, Dictifiable ):
if not self.display_interface:
return self.__no_display_interface_response()
if len(incoming):
- self.update_state( trans, self.inputs_by_page[state.page], state.inputs, incoming, old_errors=old_errors or {}, source=source )
- return "tool_form.mako", dict( errors={}, tool_state=state, param_values={}, incoming={} )
-
+ errors = self.update_state( trans, self.inputs_by_page[state.page], state.inputs, incoming, old_errors=old_errors or {}, source=source )
+ else:
+ errors, _ = self.__check_param_values( trans, state.inputs, state, old_errors, process_state, history=history, source=source )
+ return "tool_form.mako", dict( errors=errors, tool_state=state, param_values={}, incoming={} )
all_errors = []
all_params = []
for expanded_incoming, expanded_state in zip(expanded_incomings, all_states):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment