michael-s-molina commented on pull request #11997:
URL:
https://github.com/apache/incubator-superset/pull/11997#issuecomment-749143062
@etr2460 @maloun96
This change in `saveModalActions.js`:
```
return SupersetClient.post({ url, postPayload: { form_data: formData } })
.then(response => {
dispatch(saveSliceSuccess(response.json));
return response;
})
.catch(() => dispatch(saveSliceFailed()));
```
broke this code in `SaveModal.tsx`:
```
this.props.actions
.saveSlice(this.props.form_data, sliceParams)
.then(({ data }: JsonObject) => { // HERE WE ARE EXPECTING AN OBJECT
WITH DATA PROP BUT GOT RESPONSE
if (data.dashboard_id === null) {
sessionStorage.removeItem(SK_DASHBOARD_ID);
} else {
sessionStorage.setItem(SK_DASHBOARD_ID, data.dashboard_id);
}
// Go to new slice url or dashboard url
const url = gotodash ? data.dashboard_url : data.slice.slice_url;
window.location.assign(url);
});
```
That's why Cypress test `explore/link.test.js` is failing.
This was a nice contribution. One step closer to full typescript! :smiley:
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]