diff --git a/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx b/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx index b14ca36c734b1..130fa2b2a09ff 100644 --- a/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx +++ b/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx @@ -175,6 +175,19 @@ const updateHistory = debounce( additionalParam[URL_PARAMS.datasetId.name] = datasetId; } + const urlParams = payload?.url_params || {}; + Object.entries(urlParams).forEach(([key, value]) => { + if ( + ![ + URL_PARAMS.sliceId.name, + URL_PARAMS.formDataKey.name, + URL_PARAMS.datasetId.name, + ].includes(key) + ) { + additionalParam[key] = value; + } + }); + try { let key; let stateModifier; diff --git a/superset/views/core.py b/superset/views/core.py index 6ce873b185185..a51cec56216fe 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -744,8 +744,7 @@ def explore( if form_data_key: parameters = CommandParameters(actor=g.user, key=form_data_key,) value = GetFormDataCommand(parameters).run() - if value: - initial_form_data = json.loads(value) + initial_form_data = json.loads(value) if value else {} if not initial_form_data: slice_id = request.args.get("slice_id")