diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx index a2ca444752..37c13f17e5 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx @@ -744,11 +744,11 @@ const DatabaseModal: FunctionComponent = ({ engine_information, }, }); - } - if (database_name === 'Google Sheets') { - // only create a catalog if the DB is Google Sheets - setDB({ type: ActionType.addTableCatalogSheet }); + if (engine === Engines.GSheet) { + // only create a catalog if the DB is Google Sheets + setDB({ type: ActionType.addTableCatalogSheet }); + } } };