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 2021/09/01 09:43:02 UTC

[GitHub] [superset] villebro commented on a change in pull request #16425: fix(jinja): Fixed issue with filters when Jina templating is turned on

villebro commented on a change in pull request #16425:
URL: https://github.com/apache/superset/pull/16425#discussion_r699136028



##########
File path: superset/jinja_context.py
##########
@@ -297,7 +297,7 @@ def get_filters(self, column: str, remove_filter: bool = False) -> List[Filter]:
 
         for flt in form_data.get("adhoc_filters", []):
             val: Union[Any, List[Any]] = flt.get("comparator")
-            op: str = flt["operator"].upper() if "operator" in flt else None
+            op: str = flt["operator"].upper() if "operator" in flt and flt["operator"] is not None else None

Review comment:
       We could probably simplify this to something like 
   ```suggestion
               op: str = flt["operator"].upper() if flt.get("operator") else None
   ```




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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