From 0a953714acedd9d58ab331c996b6961a996d685e Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Fri, 27 Apr 2018 16:10:29 -0700 Subject: [PATCH] [sql lab] allow stoping 'pending' queries (#4896) --- superset/assets/src/SqlLab/components/SqlEditor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset/assets/src/SqlLab/components/SqlEditor.jsx b/superset/assets/src/SqlLab/components/SqlEditor.jsx index b3093f3d42871..37626a83bc280 100644 --- a/superset/assets/src/SqlLab/components/SqlEditor.jsx +++ b/superset/assets/src/SqlLab/components/SqlEditor.jsx @@ -145,7 +145,7 @@ class SqlEditor extends React.PureComponent { this.props.actions.setActiveSouthPaneTab('Results'); } stopQuery() { - if (this.props.latestQuery && this.props.latestQuery.state === 'running') { + if (this.props.latestQuery && ['running', 'pending'].indexOf(this.props.latestQuery.state) >= 0) { this.props.actions.postStopQuery(this.props.latestQuery); } }