Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dataset exists error in save Dataset modal #21244

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion superset-frontend/src/SqlLab/actions/sqlLab.js
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,10 @@ export function createDatasource(vizOptions) {

return Promise.resolve(json);
})
.catch(() => {
.catch(error => {
getClientErrorObject(error).then(e => {
dispatch(addDangerToast(e.error));
});
dispatch(
createDatasourceFailed(
t('An error occurred while creating the data source'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,11 @@ export const SaveDatasetModal: FunctionComponent<SaveDatasetModalProps> = ({
})
.catch(() => {
addDangerToast(t('An error occurred saving dataset'));
onHide();
});

setDatasetName(getDefaultDatasetName());
console.log(formData);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup removed.

onHide();
};

Expand Down