Skip to content

Commit fee2ed0

Browse files
authored
Merge pull request #21130 from mvdbeek/restore_job_get_param_values
[25.1] Restore job.get_param_values
2 parents 685fd7d + a721d6b commit fee2ed0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lib/galaxy/model/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@
130130
from sqlalchemy.orm.session import Session
131131
from sqlalchemy.sql.expression import FromClause
132132
from typing_extensions import (
133+
deprecated,
133134
Literal,
134135
NotRequired,
135136
Protocol,
@@ -2031,6 +2032,21 @@ def set_state(self, state: JobState) -> bool:
20312032
self.state_history.append(JobStateHistory(self))
20322033
return True
20332034

2035+
@deprecated("Use tool.get_param_values(job) instead")
2036+
def get_param_values(self, app, ignore_errors=False):
2037+
"""
2038+
Read encoded parameter values from the database and turn back into a
2039+
dict of tool parameter values.
2040+
"""
2041+
tool = app.toolbox.get_tool(
2042+
self.tool_id,
2043+
tool_version=self.tool_version,
2044+
tool_uuid=self.dynamic_tool and self.dynamic_tool.uuid,
2045+
user=self.user,
2046+
)
2047+
param_dict = tool.get_param_values(self, ignore_errors=ignore_errors)
2048+
return param_dict
2049+
20342050
def raw_param_dict(self):
20352051
param_dict = {p.name: p.value for p in self.parameters}
20362052
return param_dict

0 commit comments

Comments
 (0)