From 14e866cfd06900701a3e5dcf1b58115b8efb5aca Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" Date: Wed, 28 Jun 2023 16:25:35 -0300 Subject: [PATCH] fix: Error when searching for a dashboard in the chart list --- superset-frontend/src/pages/ChartList/index.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/superset-frontend/src/pages/ChartList/index.tsx b/superset-frontend/src/pages/ChartList/index.tsx index c853c40d8f972..ef1f9374e4b16 100644 --- a/superset-frontend/src/pages/ChartList/index.tsx +++ b/superset-frontend/src/pages/ChartList/index.tsx @@ -270,8 +270,8 @@ function ChartList(props: ChartListProps) { ? { filters: [ { - col: 'dashboards', - opr: FilterOperator.relationManyMany, + col: 'dashboard_title', + opr: FilterOperator.startsWith, value: filterValue, }, ], @@ -287,9 +287,7 @@ function ChartList(props: ChartListProps) { ...filters, }); const response: void | JsonResponse = await SupersetClient.get({ - endpoint: !filterValue - ? `/api/v1/dashboard/?q=${queryParams}` - : `/api/v1/chart/?q=${queryParams}`, + endpoint: `/api/v1/dashboard/?q=${queryParams}`, }).catch(() => addDangerToast(t('An error occurred while fetching dashboards')), );