mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user