Skip to content

Commit

Permalink
Use metric name instead of metric in filter box (#7106)
Browse files Browse the repository at this point in the history
(cherry picked from commit 003364e)
  • Loading branch information
michellethomas authored and xtinec committed Mar 26, 2019
1 parent 9d21f70 commit bdbb354
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,10 @@ def get_data(self, df):
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],
Expand Down

0 comments on commit bdbb354

Please sign in to comment.