You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2021/08/20 08:45:27 UTC
[superset] branch master updated: fix: call external metadata
endpoint with correct rison object (#16369)
This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 575ee24 fix: call external metadata endpoint with correct rison object (#16369)
575ee24 is described below
commit 575ee24a99011bf5b4106d3f3cc57afb2a968cb5
Author: Ville Brofeldt <33...@users.noreply.github.com>
AuthorDate: Fri Aug 20 11:43:57 2021 +0300
fix: call external metadata endpoint with correct rison object (#16369)
---
superset-frontend/src/datasource/DatasourceEditor.jsx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx
index c59b6ad..4bf2690 100644
--- a/superset-frontend/src/datasource/DatasourceEditor.jsx
+++ b/superset-frontend/src/datasource/DatasourceEditor.jsx
@@ -493,11 +493,14 @@ class DatasourceEditor extends React.PureComponent {
schema_name: datasource.schema,
table_name: datasource.table_name,
};
- const endpoint = `/datasource/external_metadata_by_name/?q=${rison.encode(
+ Object.entries(params).forEach(([key, value]) => {
// rison can't encode the undefined value
- Object.keys(params).map(key =>
- params[key] === undefined ? null : params[key],
- ),
+ if (value === undefined) {
+ params[key] = null;
+ }
+ });
+ const endpoint = `/datasource/external_metadata_by_name/?q=${rison.encode(
+ params,
)}`;
this.setState({ metadataLoading: true });