# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User Dannon Baker <dannonbaker@me.com> # Date 1288377653 14400 # Node ID 9f74170b7781122577b8cf7ffe38f5c986617844 # Parent a2e4d36c4318bc4ce73af9df869ae4071af33d55 Fix for multiple hide dataset actions when using workflow outputs. --- a/lib/galaxy/web/controllers/workflow.py +++ b/lib/galaxy/web/controllers/workflow.py @@ -1299,6 +1299,11 @@ class WorkflowController( BaseController step_outputs = [s.output_name for s in step.workflow_outputs] for output in tool.outputs.keys(): if output not in step_outputs: + # Necessary, unfortunately, to clean up workflows that might have more than one at this point. + for pja in step.post_job_actions: + if pja.action_type == "HideDatasetAction" and pja.output_name == output: + step.post_job_actions.remove(pja) + trans.sa_session.delete(pja) # Create a PJA for hiding this output. n_pja = PostJobAction('HideDatasetAction', step, output, {}) else: