From 30872b2ae746324083f315a2be00144dea048f19 Mon Sep 17 00:00:00 2001 From: Tomer Haskalovitch Date: Sun, 21 Sep 2025 12:49:29 +0300 Subject: [PATCH] mgr/dashboard: fix command alias help message Signed-off-by: Tomer Haskalovitch --- src/pybind/mgr/dashboard/services/nvmeof_cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/dashboard/services/nvmeof_cli.py b/src/pybind/mgr/dashboard/services/nvmeof_cli.py index 45624d95b323f..5dd6b199fe85b 100644 --- a/src/pybind/mgr/dashboard/services/nvmeof_cli.py +++ b/src/pybind/mgr/dashboard/services/nvmeof_cli.py @@ -234,6 +234,7 @@ class NvmeofCLICommand(CLICommand): self._output_formatter = AnnotatedDataTextOutputFormatter() self._model = model self._alias = alias + self._alias_cmd: Optional[NvmeofCLICommand] = None def _use_api_endpoint_desc_if_available(self, func): if not self.desc and hasattr(func, 'doc_info'): @@ -241,7 +242,9 @@ class NvmeofCLICommand(CLICommand): def __call__(self, func) -> HandlerFuncType: # type: ignore if self._alias: - NvmeofCLICommand(self._alias, model=self._model)._register_handler(func) + self._alias_cmd = NvmeofCLICommand(self._alias, model=self._model) + assert self._alias_cmd is not None + self._alias_cmd(func) resp = super().__call__(func) self._use_api_endpoint_desc_if_available(func) -- 2.39.5