This is an automated email from the ASF dual-hosted git repository. villebro pushed a commit to branch 1.3 in repository https://gitbox.apache.org/repos/asf/superset.git
commit c53eaaec57e870cb1a2a75351ef5a64acab222ca 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 b46fa96..d1d2f31 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -712,7 +712,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,too-many-return-statements,too-many-statements + # 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: user_id = g.user.get_id() if g.user else None @@ -836,6 +837,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
