Commit 2994a0f4 authored by Ahmed Awan's avatar Ahmed Awan
Browse files

use latest version's name on `WorkflowRun` forms

Show the name corresponding to the `WorkflowRun` form workflow's version.
parent f8668a47
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -919,6 +919,9 @@ class WorkflowContentsManager(UsesAnnotations):
            raise exceptions.RequestParameterInvalidException(f"Unknown workflow style {style}")
        if version is not None:
            wf_dict["version"] = version
            # If returning a run-form workflow for a specific version, use that version's name
            if style == "run":
                wf_dict["name"] = workflow.name
        else:
            wf_dict["version"] = len(stored.workflows) - 1
        return wf_dict