-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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: turn on SSL in database edit form show 500 error #16151
Conversation
superset/db_engine_specs/base.py
Outdated
if isinstance(query, str): | ||
# Make sure query isn't an empty string | ||
if not query: | ||
query = {} | ||
else: | ||
query = literal_eval(query) |
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.
The proper way to handle this would be fixing the frontend to always send an object, like I commented here: https://github.com/apache/superset/pull/16038/files#r681331894
We need to either fix DatabaseObject.query
to have only type object
here, or at least fix the FE so that it converts query
correctly to an object before doing a request to the backend.
Codecov Report
@@ Coverage Diff @@
## master #16151 +/- ##
=======================================
Coverage 76.62% 76.62%
=======================================
Files 996 996
Lines 53015 53015
Branches 6744 6744
=======================================
Hits 40622 40622
Misses 12167 12167
Partials 226 226
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Nice! Thanks for fixing this!
superset/db_engine_specs/base.py
Outdated
@@ -18,6 +18,7 @@ | |||
import json | |||
import logging | |||
import re | |||
from ast import literal_eval |
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.
from ast import literal_eval |
console.log('inValidate', database); | ||
console.log(onCreate); |
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.log('inValidate', database); | |
console.log(onCreate); |
76dfa8a
to
ebe3618
Compare
🏷 2021.31 |
* fix error for query.update * converrt before making request * fix query params * remove unchanged files * this * update tsconfig (cherry picked from commit 3f86a54)
* fix error for query.update * converrt before making request * fix query params * remove unchanged files * this * update tsconfig (cherry picked from commit 3f86a54)
* fix error for query.update * converrt before making request * fix query params * remove unchanged files * this * update tsconfig
* fix error for query.update * converrt before making request * fix query params * remove unchanged files * this * update tsconfig (cherry picked from commit 3f86a54)
* fix error for query.update * converrt before making request * fix query params * remove unchanged files * this * update tsconfig
* fix error for query.update * converrt before making request * fix query params * remove unchanged files * this * update tsconfig (cherry picked from commit 3f86a54)
* fix error for query.update * converrt before making request * fix query params * remove unchanged files * this * update tsconfig (cherry picked from commit 0f55202)
SUMMARY
Getting the following error for editing SSL for DBC UI.
To fix this we are going to
ast_literal
to convert the string object to a dictionaryBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION