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/07 16:29:32 UTC

[superset] 01/01: cleanup

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

hugh pushed a commit to branch use-gsheet-enum-catalog
in repository https://gitbox.apache.org/repos/asf/superset.git

commit caab009a8621e9cc7c1c04e174b1da4fc1adb003
Author: hughhhh <hu...@gmail.com>
AuthorDate: Fri Oct 7 12:24:50 2022 -0400

    cleanup
---
 .../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 });
+      }
     }
   };