fix(contextmenu): uncaught TypeError (#28203)

(cherry picked from commit 29b62f7c0a)
This commit is contained in:
sowo
2025-03-19 03:42:38 +01:00
committed by Michael S. Molina
parent 6917362d78
commit f6f1ffae2f
5 changed files with 64 additions and 4 deletions

View File

@@ -258,7 +258,12 @@ class QueryObject: # pylint: disable=too-many-instance-attributes
@property
def metric_names(self) -> list[str]:
"""Return metrics names (labels), coerce adhoc metrics to strings."""
return get_metric_names(self.metrics or [])
return get_metric_names(
self.metrics or [],
self.datasource.verbose_map
if self.datasource and hasattr(self.datasource, "verbose_map")
else None,
)
@property
def column_names(self) -> list[str]: