From bd3166b6034f79e731abc662f427ef0dff23d3d4 Mon Sep 17 00:00:00 2001 From: "Hugh A. Miles II" Date: Tue, 11 Oct 2022 15:19:12 -0400 Subject: [PATCH] chore: cleanup on catalog check for Gsheets (#21738) --- .../src/views/CRUD/data/database/DatabaseModal/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 }); + } } };