You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/07/17 22:42:00 UTC

[GitHub] [incubator-superset] williaster commented on a change in pull request #7888: [sqla] Adding check for invalid filter columns

williaster commented on a change in pull request #7888: [sqla] Adding check for invalid filter columns
URL: https://github.com/apache/incubator-superset/pull/7888#discussion_r304671101
 
 

 ##########
 File path: superset/connectors/sqla/models.py
 ##########
 @@ -721,43 +721,46 @@ def get_sqla_query(  # sqla
             if not all([flt.get(s) for s in ["col", "op"]]):
                 continue
             col = flt["col"]
+
+            if col not in cols:
+                raise Exception(_(f"Column '{col}' is not valid"))
 
 Review comment:
   maybe we could update the language to be a little more precise here? For example `Column '{col}' does not exist`  / `... not found`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org