Skip to content

Commit

Permalink
Merge pull request #16728 from kysrpex/job_resource_parameters_child_…
Browse files Browse the repository at this point in the history
…elements_missing

[23.1] Workaround for XML nodes of job resource parameters losing their children
  • Loading branch information
mvdbeek authored Sep 25, 2023
2 parents 73ad4f4 + 4bb1d56 commit 602cdd4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/galaxy/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
ToolEvaluator,
)
from galaxy.util import (
etree,
parse_xml_string,
RWXRWXRWX,
safe_makedirs,
Expand Down Expand Up @@ -641,7 +642,7 @@ def get_tool_resource_xml(self, tool_id, tool_type):
field_name, self.resource_parameters
)
raise KeyError(message)
fields.append(self.resource_parameters[field_name])
fields.append(etree.fromstring(self.resource_parameters[field_name]))

if fields:
conditional_element = parse_xml_string(self.JOB_RESOURCE_CONDITIONAL_XML)
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ def parse_resource_parameters(resource_param_file):
resource_definitions_root = resource_definitions.getroot()
for parameter_elem in resource_definitions_root.findall("param"):
name = parameter_elem.get("name")
resource_parameters[name] = parameter_elem
resource_parameters[name] = etree.tostring(parameter_elem)

return resource_parameters

Expand Down

0 comments on commit 602cdd4

Please sign in to comment.