villebro opened a new pull request #13147: URL: https://github.com/apache/superset/pull/13147
### SUMMARY Some databases return sets in the dict payload (they should be lists according to the [docs](https://docs.sqlalchemy.org/en/13/core/reflection.html#sqlalchemy.engine.reflection.Inspector.get_pk_constraint)) when calling `inspectog.get_pk_constraint` which doesn't serialize to JSON. In addition, an empty set evaluates to truthy vs lists that evaluate to falsy, causing trouble downstream. By normalizing to JSON serializable datatypes we ensure that the response for the external metadata endpoint will return a valid response. ### TEST PLAN Local testing ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Changes UI - [ ] Requires DB Migration. - [ ] Confirm DB Migration upgrade and downgrade tested. - [ ] Introduces new feature or API - [ ] Removes existing feature or API ---------------------------------------------------------------- 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]
