mirror of
https://github.com/apache/superset.git
synced 2024-09-07 06:17:45 -04:00
fix: dataset exists error in save Dataset modal (#21244)
* dataset exists error * fixed flashing modal
This commit is contained in:
parent
9c4ae2ab7e
commit
a7fe4850ed
@ -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'),
|
||||
|
@ -304,13 +304,12 @@ export const SaveDatasetModal: FunctionComponent<SaveDatasetModalProps> = ({
|
||||
[URL_PARAMS.formDataKey.name]: key,
|
||||
});
|
||||
createWindow(url);
|
||||
setDatasetName(getDefaultDatasetName());
|
||||
onHide();
|
||||
})
|
||||
.catch(() => {
|
||||
addDangerToast(t('An error occurred saving dataset'));
|
||||
});
|
||||
|
||||
setDatasetName(getDefaultDatasetName());
|
||||
onHide();
|
||||
};
|
||||
|
||||
const handleOverwriteDatasetOption = (value: SelectValue, option: any) => {
|
||||
|
Loading…
Reference in New Issue
Block a user