Skip to content

Commit

Permalink
fix: sqllab schema select error msg (#18564)
Browse files Browse the repository at this point in the history
* fix: sqllab schema select error msg

* remove console logs

* fix lint
  • Loading branch information
pkdotson authored Feb 4, 2022
1 parent 6cad7b1 commit 151d30b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions superset-frontend/src/SqlLab/actions/sqlLab.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,12 +776,14 @@ export function queryEditorSetDb(queryEditor, dbId) {

export function queryEditorSetSchema(queryEditor, schema) {
return function (dispatch) {
const sync = isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE)
? SupersetClient.put({
endpoint: encodeURI(`/tabstateview/${queryEditor.id}`),
postPayload: { schema },
})
: Promise.resolve();
const sync =
isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE) &&
typeof queryEditor === 'object'
? SupersetClient.put({
endpoint: encodeURI(`/tabstateview/${queryEditor.id}`),
postPayload: { schema },
})
: Promise.resolve();

return sync
.then(() =>
Expand Down

0 comments on commit 151d30b

Please sign in to comment.