This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 87d47987b7 fix(sql-lab): do not replace undefined schema with empty
object (#19664)
87d47987b7 is described below
commit 87d47987b7800a183f3eebf2cfa7781d450e6e37
Author: Ville Brofeldt <[email protected]>
AuthorDate: Tue Apr 12 15:13:03 2022 +0300
fix(sql-lab): do not replace undefined schema with empty object (#19664)
---
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;