New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fix test connection for extra fields #15645
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15645 +/- ##
==========================================
- Coverage 76.91% 76.76% -0.15%
==========================================
Files 978 978
Lines 51486 51487 +1
Branches 6950 6950
==========================================
- Hits 39601 39525 -76
- Misses 11661 11738 +77
Partials 224 224
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -384,11 +393,13 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({ | |||
return; | |||
} | |||
|
|||
console.log(db); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console statement
engine_params: JSON.parse((extraJson?.engine_params as string) || '{}'), | ||
schemas_allowed_for_csv_upload: | ||
(extraJson?.schemas_allowed_for_csv_upload as string) || '[]', | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this something that we can handle in the db reducer so that we can keep the state in the reducer as close to the state that the api requires?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
🏷 2021.27 |
* create serialize json function * remove console.log * use function (cherry picked from commit 2dc8bd6)
* create serialize json function * remove console.log * use function
* create serialize json function * remove console.log * use function
* create serialize json function * remove console.log * use function
SUMMARY
Allowing extra_json to be serialized into extra before trying to connect to DB from sqla form
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION