fix: passing url params in sqllab (#15246)

* fix: passing url params in sqllab

* avoid undefined serach and add test

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
This commit is contained in:
maltoze
2022-02-15 19:18:04 +08:00
committed by GitHub
parent 5bb406b296
commit 57c4d0f9a4
2 changed files with 30 additions and 3 deletions

View File

@@ -332,8 +332,9 @@ export function runQuery(query) {
expand_data: true,
};
const search = window.location.search || '';
return SupersetClient.post({
endpoint: '/superset/sql_json/',
endpoint: `/superset/sql_json/${search}`,
body: JSON.stringify(postPayload),
headers: { 'Content-Type': 'application/json' },
parseMethod: 'text',