superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Sqllab dont send empty queries to db (#3459)
Date Thu, 14 Sep 2017 16:50:08 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 31b7b9a  Sqllab  dont send empty queries to db (#3459)
31b7b9a is described below

commit 31b7b9a6a0ea42a8132e923144306d337830b7ad
Author: timifasubaa <30888507+timifasubaa@users.noreply.github.com>
AuthorDate: Thu Sep 14 09:50:06 2017 -0700

    Sqllab  dont send empty queries to db (#3459)
    
    * add lanscape?
    
    * prevent empty queries from being sent to db
    
    * Revert "add lanscape?"
    
    This reverts commit b3d6e80af49120b030f7d3d5eff0592a1e0566f2.
    
    * improve code style
    
    * nit
    
    * unnit
    
    * renit
---
 superset/assets/javascripts/SqlLab/components/SqlEditor.jsx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/superset/assets/javascripts/SqlLab/components/SqlEditor.jsx b/superset/assets/javascripts/SqlLab/components/SqlEditor.jsx
index 6372225..111adc7 100644
--- a/superset/assets/javascripts/SqlLab/components/SqlEditor.jsx
+++ b/superset/assets/javascripts/SqlLab/components/SqlEditor.jsx
@@ -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;

-- 
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <commits@superset.apache.org>'].

Mime
View raw message