betodealmeida commented on a change in pull request #17788:
URL: https://github.com/apache/superset/pull/17788#discussion_r771553353



##########
File path: superset/views/core.py
##########
@@ -2395,7 +2395,7 @@ def validate_sql_json(
         schema = request.form.get("schema") or None
         template_params = json.loads(request.form.get("templateParams") or 
"{}")
 
-        if len(template_params) > 0:
+        if template_params is not None and len(template_params) > 0:

Review comment:
       Nit, since in Python an empty list/dict is false you can simplify to:
   
   ```suggestion
           if template_params:
   ```




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to