Skip to content

Commit

Permalink
fix delete modal close + rm extra db props on save
Browse files Browse the repository at this point in the history
  • Loading branch information
riahk committed Sep 10, 2020
1 parent 358cfdd commit 42e90a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ function DatabaseList({ addDangerToast, addSuccessToast }: DatabaseListProps) {
() => {
refreshData();
addSuccessToast(t('Deleted: %s', dbName));

// Close delete modal
setDatabaseCurrentlyDeleting(null);
},
createErrorHandler(errMsg =>
addDangerToast(t('There was an issue deleting %s: %s', dbName, errMsg)),
Expand Down
16 changes: 0 additions & 16 deletions superset-frontend/src/views/CRUD/data/database/DatabaseModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,22 +189,6 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
delete update.id;
}

if (!update.cache_timeout) {
update.cache_timeout = '0';
}

if (!update.encrypted_extra) {
update.encrypted_extra = '';
}

if (!update.force_ctas_schema) {
update.force_ctas_schema = '';
}

if (!update.server_cert) {
update.server_cert = '';
}

if (db && db.id) {
updateResource(db.id, update).then(() => {
if (onDatabaseAdd) {
Expand Down

0 comments on commit 42e90a3

Please sign in to comment.