mirror of https://github.com/apache/superset.git
fix(key-value): lost url_params after long-url feature (#18846)
This commit is contained in:
parent
a9a892945e
commit
4c16586067
|
@ -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;
|
||||
|
|
|
@ -744,8 +744,7 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
|
|||
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")
|
||||
|
|
Loading…
Reference in New Issue