diff --git a/lib/galaxy/managers/workflows.py b/lib/galaxy/managers/workflows.py index ef3767a16c1..e889075c615 100644 --- a/lib/galaxy/managers/workflows.py +++ b/lib/galaxy/managers/workflows.py @@ -335,6 +335,11 @@ class WorkflowContentsManager(UsesAnnotations): annotation_str = "" if step_annotation: annotation_str = step_annotation.annotation + form_html = None + if trans.history: + # If in a web session, attach form html. No reason to do + # so for API requests. + form_html = module.get_config_form() # Pack attributes into plain dictionary step_dict = { 'id': step.order_index, @@ -346,7 +351,7 @@ class WorkflowContentsManager(UsesAnnotations): 'tool_errors': module.get_errors(), 'data_inputs': module.get_data_inputs(), 'data_outputs': module.get_data_outputs(), - 'form_html': module.get_config_form(), + 'form_html': form_html, 'annotation': annotation_str, 'post_job_actions': {}, 'uuid': str(step.uuid) if step.uuid else None, diff --git a/test/api/test_tools.py b/test/api/test_tools.py index b7507c37414..62db749398f 100644 --- a/test/api/test_tools.py +++ b/test/api/test_tools.py @@ -780,6 +780,7 @@ class ToolsTestCase( api.ApiTestCase ): self.assertEquals( len( outputs ), 2 ) output1 = outputs[ 0 ] output2 = outputs[ 1 ] + self.dataset_populator.wait_for_history( history_id, timeout=25 ) output1_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output1 ) output2_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output2 ) self.assertEquals( output1_content.strip(), "123\n789" )