You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2022/04/15 11:53:00 UTC
[superset] 02/06: fix(sql-lab): do not replace undefined schema with empty object (#19664)
This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch 1.5
in repository https://gitbox.apache.org/repos/asf/superset.git
commit d657d813e35345f60ef2ecba67c5ef2efe4d8dcc
Author: Ville Brofeldt <33...@users.noreply.github.com>
AuthorDate: Tue Apr 12 15:13:03 2022 +0300
fix(sql-lab): do not replace undefined schema with empty object (#19664)
(cherry picked from commit 87d47987b7800a183f3eebf2cfa7781d450e6e37)
---
superset-frontend/src/SqlLab/actions/sqlLab.js | 2 +-
superset-frontend/src/SqlLab/types.ts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/src/SqlLab/actions/sqlLab.js b/superset-frontend/src/SqlLab/actions/sqlLab.js
index e602b796bd..3d1298e6c3 100644
--- a/superset-frontend/src/SqlLab/actions/sqlLab.js
+++ b/superset-frontend/src/SqlLab/actions/sqlLab.js
@@ -791,7 +791,7 @@ export function queryEditorSetSchema(queryEditor, schema) {
dispatch({
type: QUERY_EDITOR_SET_SCHEMA,
queryEditor: queryEditor || {},
- schema: schema || {},
+ schema,
}),
)
.catch(() =>
diff --git a/superset-frontend/src/SqlLab/types.ts b/superset-frontend/src/SqlLab/types.ts
index d5dfddbe2b..6693089574 100644
--- a/superset-frontend/src/SqlLab/types.ts
+++ b/superset-frontend/src/SqlLab/types.ts
@@ -61,7 +61,7 @@ export type Query = {
query: { limit: number };
};
resultsKey: string | null;
- schema: string;
+ schema?: string;
sql: string;
sqlEditorId: string;
state: QueryState;