lyndsiWilliams commented on a change in pull request #14293:
URL: https://github.com/apache/superset/pull/14293#discussion_r622451901



##########
File path: superset-frontend/src/views/CRUD/data/database/DatabaseModal.tsx
##########
@@ -205,6 +223,16 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> 
= ({
 
       fetchResource(id)
         .then(() => {
+          // Altering 'extra' JSON before returning it to 'extra' text field
+          if (dbFetched?.extra) {
+            // Parse 'extra' field
+            const extraParsed = JSON.parse(dbFetched.extra || defaultExtra);
+            // Remove metadata_cache_timeout and schemas_allowed_for_csv_upload
+            delete extraParsed.metadata_cache_timeout;
+            delete extraParsed.schemas_allowed_for_csv_upload;

Review comment:
       I'm currently storing them in useState, in the `metaDataCacheTimeout` 
and `schemasAllowed` variables. This may be moved to useReducer soon though!




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