Fix tests errors and warnings - iteration 1 (#12212) (#12213)

This commit is contained in:
Michael S. Molina
2021-01-05 21:24:57 -03:00
committed by GitHub
parent 147605cb40
commit 1b908ab9f1
10 changed files with 128 additions and 105 deletions

View File

@@ -296,9 +296,18 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
const id = database.id || 0;
setTabKey(DEFAULT_TAB_KEY);
fetchResource(id).then(() => {
setDB(dbFetched);
});
fetchResource(id)
.then(() => {
setDB(dbFetched);
})
.catch(e =>
addDangerToast(
t(
'Sorry there was an error fetching database information: %s',
e.message,
),
),
);
}
} else if (!isEditMode && (!db || db.id || (isHidden && show))) {
setTabKey(DEFAULT_TAB_KEY);