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: [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