eschutho commented on a change in pull request #15934:
URL: https://github.com/apache/superset/pull/15934#discussion_r678644406



##########
File path: superset-frontend/src/reports/actions/reportState.js
##########
@@ -112,3 +112,39 @@ export function toggleActive(report, isActive) {
       });
   };
 }
+
+export function deleteActiveReport(report) {
+  return function deleteActiveReportThunk(dispatch, getState) {
+    return SupersetClient.delete({
+      endpoint: encodeURI(`/api/v1/report/${report.id}`),
+    })
+      .then(() => {
+        const state = getState();
+        const { user, dashboardInfo, charts, explore } = state;
+        if (dashboardInfo) {

Review comment:
       did you want to move these into finally so that they don't show the 
report could not be deleted error?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to