Sqllab dont send empty queries to db (#3459)

* add lanscape?

* prevent empty queries from being sent to db

* Revert "add lanscape?"

This reverts commit b3d6e80af4.

* improve code style

* nit

* unnit

* renit
This commit is contained in:
timifasubaa
2017-09-14 09:50:06 -07:00
committed by Maxime Beauchemin
parent 745784fc97
commit 31b7b9a6a0

View File

@@ -76,6 +76,9 @@ class SqlEditor extends React.PureComponent {
this.props.actions.queryEditorSetSql(this.props.queryEditor, sql);
}
runQuery(runAsync = false) {
if (!this.props.queryEditor.sql) {
return;
}
let effectiveRunAsync = runAsync;
if (!this.props.database.allow_run_sync) {
effectiveRunAsync = true;