Skip to content

Commit

Permalink
Check if the query is in state first. (#2226)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkyryliuk authored Feb 23, 2017
1 parent dac0d1d commit dc05be3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions superset/assets/javascripts/SqlLab/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit dc05be3

Please sign in to comment.