From 003364e74ea70cad1a4a6e784933fe8bef4c78ec Mon Sep 17 00:00:00 2001 From: michellethomas Date: Mon, 25 Mar 2019 09:57:39 -0700 Subject: [PATCH] Use metric name instead of metric in filter box (#7106) --- superset/viz.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/superset/viz.py b/superset/viz.py index 1a93adbfb..786fad11d 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -1825,7 +1825,10 @@ class FilterBoxViz(BaseViz): metric = flt.get('metric') df = self.dataframes.get(col) if metric: - df = df.sort_values(metric, ascending=flt.get('asc')) + df = df.sort_values( + utils.get_metric_name(metric), + ascending=flt.get('asc'), + ) d[col] = [{ 'id': row[0], 'text': row[0],