superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michel...@apache.org
Subject [incubator-superset] branch master updated: Use metric name instead of metric in filter box (#7106)
Date Mon, 25 Mar 2019 16:57:50 GMT
This is an automated email from the ASF dual-hosted git repository.

michellet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 003364e  Use metric name instead of metric in filter box (#7106)
003364e is described below

commit 003364e74ea70cad1a4a6e784933fe8bef4c78ec
Author: michellethomas <michelle.q.thomas@gmail.com>
AuthorDate: Mon Mar 25 09:57:39 2019 -0700

    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 1a93adb..786fad1 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],


Mime
View raw message