diff --git a/superset-frontend/src/views/chartList/ChartList.tsx b/superset-frontend/src/views/chartList/ChartList.tsx index ebf1a484a..351f232c6 100644 --- a/superset-frontend/src/views/chartList/ChartList.tsx +++ b/superset-frontend/src/views/chartList/ChartList.tsx @@ -280,11 +280,9 @@ class ChartList extends React.PureComponent { ); }; - handleBulkDashboardDelete = (charts: Chart[]) => { + handleBulkChartDelete = (charts: Chart[]) => { SupersetClient.delete({ - endpoint: `/api/v1/dashboard/?q=!(${charts - .map(({ id }) => id) - .join(',')})`, + endpoint: `/api/v1/chart/?q=!(${charts.map(({ id }) => id).join(',')})`, }).then( ({ json = {} }) => { const { lastFetchDataConfig } = this.state; @@ -296,7 +294,7 @@ class ChartList extends React.PureComponent { (err: any) => { console.error(err); this.props.addDangerToast( - t('There was an issue deleting the selected dashboards'), + t('There was an issue deleting the selected charts'), ); }, ); @@ -408,7 +406,7 @@ class ChartList extends React.PureComponent { description={t( 'Are you sure you want to delete the selected charts?', )} - onConfirm={this.handleBulkDashboardDelete} + onConfirm={this.handleBulkChartDelete} > {confirmDelete => { const bulkActions = [];