fix: sorting by saved metric (#13059)
This commit is contained in:
parent
4183a03542
commit
c1e10c4627
|
|
@ -1150,6 +1150,8 @@ class SqlaTable( # pylint: disable=too-many-public-methods,too-many-instance-at
|
|||
col = self.adhoc_metric_to_sqla(col, columns_by_name)
|
||||
elif col in columns_by_name:
|
||||
col = columns_by_name[col].get_sqla_col()
|
||||
elif col in metrics_by_name:
|
||||
col = metrics_by_name[col].get_sqla_col()
|
||||
|
||||
if isinstance(col, Label):
|
||||
label = col._label # pylint: disable=protected-access
|
||||
|
|
|
|||
|
|
@ -271,8 +271,8 @@ def create_slices(
|
|||
groupby=["name"],
|
||||
adhoc_filters=[gen_filter("gender", "girl")],
|
||||
row_limit=50,
|
||||
timeseries_limit_metric="sum__num",
|
||||
metrics=metrics,
|
||||
timeseries_limit_metric=metric,
|
||||
metrics=[metric],
|
||||
),
|
||||
),
|
||||
Slice(
|
||||
|
|
@ -300,7 +300,8 @@ def create_slices(
|
|||
groupby=["name"],
|
||||
adhoc_filters=[gen_filter("gender", "boy")],
|
||||
row_limit=50,
|
||||
metrics=metrics,
|
||||
timeseries_limit_metric=metric,
|
||||
metrics=[metric],
|
||||
),
|
||||
),
|
||||
Slice(
|
||||
|
|
|
|||
Loading…
Reference in New Issue