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



##########
File path: 
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
##########
@@ -316,6 +316,15 @@ function dbReducer(
 
 const DEFAULT_TAB_KEY = '1';
 
+const serializeExtra = (extraJson: DatabaseObject['extra_json']) =>
+  JSON.stringify({
+    ...extraJson,
+    metadata_params: JSON.parse((extraJson?.metadata_params as string) || 
'{}'),
+    engine_params: JSON.parse((extraJson?.engine_params as string) || '{}'),
+    schemas_allowed_for_csv_upload:
+      (extraJson?.schemas_allowed_for_csv_upload as string) || '[]',
+  });

Review comment:
       we tried this intially but would get error everytime the user would have 
a misformatted JSON. So we broke it out to seperate field then onCreate or 
testConn we'd serialize and create the request.




-- 
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.

To unsubscribe, e-mail: [email protected]

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