fix: Error when searching for a dashboard in the chart list (#24546)

This commit is contained in:
Michael S. Molina 2023-06-29 17:11:25 -03:00 committed by GitHub
parent 2dfb50b83a
commit 2b1275d8c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -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')),
);