fix(sqllab): reverts #22695 (#22861)

This commit is contained in:
JUST.in DO IT
2023-01-26 13:15:42 -08:00
committed by GitHub
parent 3fd4718ecb
commit 0045816772
8 changed files with 20 additions and 207 deletions

View File

@@ -128,22 +128,10 @@ export function getUpToDateQuery(rootState, queryEditor, key) {
sqlLab: { unsavedQueryEditor },
} = rootState;
const id = key ?? queryEditor.id;
const updatedQueryEditor = {
return {
...queryEditor,
...(id === unsavedQueryEditor.id && unsavedQueryEditor),
};
if (
'schema' in updatedQueryEditor &&
!updatedQueryEditor.schemaOptions?.find(
({ value }) => value === updatedQueryEditor.schema,
)
) {
// remove the deprecated schema option
delete updatedQueryEditor.schema;
}
return updatedQueryEditor;
}
export function resetState() {