From 2318cc18bd944ae63e3bfd1dab814572d8ba4dbc Mon Sep 17 00:00:00 2001 From: Kamil Gabryjelski Date: Tue, 21 Dec 2021 11:13:43 +0100 Subject: [PATCH] Bug fix --- .../plugins/plugin-chart-pivot-table/src/plugin/buildQuery.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/buildQuery.ts b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/buildQuery.ts index 6c601ff9dec95..677902b796800 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/buildQuery.ts +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/buildQuery.ts @@ -36,8 +36,7 @@ export default function buildQuery(formData: PivotTableQueryFormData) { let orderBy: QueryFormOrderBy[] | undefined; if (series_limit_metric) { orderBy = [[series_limit_metric, !order_desc]]; - } - if (Array.isArray(metrics) && metrics[0]) { + } else if (Array.isArray(metrics) && metrics[0]) { orderBy = [[metrics[0], !order_desc]]; } return [