hughhhh commented on a change in pull request #13810:
URL: https://github.com/apache/superset/pull/13810#discussion_r603590439



##########
File path: superset-frontend/src/views/CRUD/data/database/DatabaseModal.tsx
##########
@@ -161,30 +178,53 @@ const DatabaseModal: 
FunctionComponent<DatabaseModalProps> = ({
     }
 
     const connection = {
-      sqlalchemy_uri: db ? db.sqlalchemy_uri : '',
-      database_name:
-        db && db.database_name.length ? db.database_name : undefined,
-      impersonate_user: db ? db.impersonate_user || undefined : undefined,
-      extra: db && db.extra && db.extra.length ? db.extra : undefined,
-      encrypted_extra: db ? db.encrypted_extra || undefined : undefined,
-      server_cert: db ? db.server_cert || undefined : undefined,
+      sqlalchemy_uri: db?.sqlalchemy_uri || '',
+      database_name: db?.database_name || undefined,
+      impersonate_user: db?.impersonate_user || undefined,
+      extra: db?.extra || undefined,
+      encrypted_extra: db?.encrypted_extra || undefined,
+      server_cert: db?.server_cert || undefined,
     };
 
-    testDatabaseConnection(connection, addDangerToast, addSuccessToast);
+    SupersetClient.post({

Review comment:
       can we do a makeApi request pattern here e.g.
   
   
https://github.com/apache/superset/blob/9773aba522e957ed9423045ca153219638a85d2f/superset-frontend/src/views/CRUD/alert/AlertList.tsx#L61




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to