This is an automated email from the ASF dual-hosted git repository.
beto 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 ace9c78 fix(explore): Ensuring parameters key is included (#16949)
ace9c78 is described below
commit ace9c786844a144c89e705c9ae244068c8692400
Author: Craig Rueda <[email protected]>
AuthorDate: Sun Oct 3 15:07:13 2021 -0700
fix(explore): Ensuring parameters key is included (#16949)
* Ensuring parameters key is included
* Fixing linter
---
superset/views/core.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/superset/views/core.py b/superset/views/core.py
index c9bcac7..8d6345b 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -726,7 +726,8 @@ class Superset(BaseSupersetView): # pylint:
disable=too-many-public-methods
@event_logger.log_this
@expose("/explore/<datasource_type>/<int:datasource_id>/", methods=["GET",
"POST"])
@expose("/explore/", methods=["GET", "POST"])
- def explore( # pylint: disable=too-many-locals
+ # pylint: disable=too-many-locals,too-many-branches,too-many-statements
+ def explore(
self, datasource_type: Optional[str] = None, datasource_id:
Optional[int] = None
) -> FlaskResponse:
form_data, slc = get_form_data(use_slice_data=True)
@@ -849,6 +850,9 @@ class Superset(BaseSupersetView): # pylint:
disable=too-many-public-methods
}
try:
datasource_data = datasource.data if datasource else
dummy_datasource_data
+ datasource_database = datasource_data.get("database")
+ if datasource_database:
+ datasource_database["parameters"] = {}
except (SupersetException, SQLAlchemyError):
datasource_data = dummy_datasource_data