You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2022/10/11 19:19:26 UTC

[superset] branch master updated: chore: cleanup on catalog check for Gsheets (#21738)

This is an automated email from the ASF dual-hosted git repository.

hugh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new bd3166b603 chore: cleanup on catalog check for Gsheets (#21738)
bd3166b603 is described below

commit bd3166b6034f79e731abc662f427ef0dff23d3d4
Author: Hugh A. Miles II <hu...@gmail.com>
AuthorDate: Tue Oct 11 15:19:12 2022 -0400

    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<DatabaseModalProps> = ({
           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 });
+      }
     }
   };