# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User Daniel Blankenberg <dan@bx.psu.edu> # Date 1289341236 18000 # Node ID 0e3fe3e7b21bfd78461869817c6b43db827d77f0 # Parent 479b377ef455f2d676fb84363b0b6d437d6af5f6 Allow display framework to work with workflows that contain tools that have been updated. Previously, this would cause a server error when trying to view a workflow or a page with an embedded workflow that contained an updated tool. --- a/templates/workflow/display.mako +++ b/templates/workflow/display.mako @@ -1,4 +1,5 @@ <%inherit file="/display_base.mako"/> +<%namespace file="/display_common.mako" import="render_message" /><%! from galaxy.tools.parameters import DataToolParameter, RuntimeValue @@ -54,6 +55,9 @@ ${param.value_to_display_text( value, app )} %endif </div> + %if hasattr( step, 'upgrade_messages' ) and step.upgrade_messages and param.name in step.upgrade_messages: + ${render_message( step.upgrade_messages[param.name], "info" )} + %endif </div></%def> --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -207,9 +207,12 @@ class UsesStoredWorkflow( SharableItemSe def get_stored_workflow_steps( self, trans, stored_workflow ): """ Restores states for a stored workflow's steps. """ for step in stored_workflow.latest_workflow.steps: + step.upgrade_messages = {} if step.type == 'tool' or step.type is None: # Restore the tool state for the step module = module_factory.from_workflow_step( trans, step ) + #Check if tool was upgraded + step.upgrade_messages = module.check_and_update_state() # Any connected input needs to have value DummyDataset (these # are not persisted so we need to do it every time) module.add_dummy_datasets( connections=step.input_connections )