mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
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;
|
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 {
|
try {
|
||||||
let key;
|
let key;
|
||||||
let stateModifier;
|
let stateModifier;
|
||||||
|
@ -744,8 +744,7 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
|
|||||||
if form_data_key:
|
if form_data_key:
|
||||||
parameters = CommandParameters(actor=g.user, key=form_data_key,)
|
parameters = CommandParameters(actor=g.user, key=form_data_key,)
|
||||||
value = GetFormDataCommand(parameters).run()
|
value = GetFormDataCommand(parameters).run()
|
||||||
if value:
|
initial_form_data = json.loads(value) if value else {}
|
||||||
initial_form_data = json.loads(value)
|
|
||||||
|
|
||||||
if not initial_form_data:
|
if not initial_form_data:
|
||||||
slice_id = request.args.get("slice_id")
|
slice_id = request.args.get("slice_id")
|
||||||
|
Loading…
Reference in New Issue
Block a user