mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
Check if the query is in state first. (#2226)
This commit is contained in:
@@ -242,10 +242,9 @@ export const sqlLabReducer = function (state, action) {
|
||||
let change = false;
|
||||
for (const id in action.alteredQueries) {
|
||||
const changedQuery = action.alteredQueries[id];
|
||||
if (
|
||||
state.queries[id].state !== 'stopped' &&
|
||||
(!state.queries.hasOwnProperty(id) ||
|
||||
state.queries[id].changedOn !== changedQuery.changedOn)) {
|
||||
if (!state.queries.hasOwnProperty(id) ||
|
||||
(state.queries[id].changedOn !== changedQuery.changedOn &&
|
||||
state.queries[id].state !== 'stopped')) {
|
||||
newQueries[id] = Object.assign({}, state.queries[id], changedQuery);
|
||||
change = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user