diff --git a/superset/utils/core.py b/superset/utils/core.py index 084b51332adce..9b1590b5c1461 100644 --- a/superset/utils/core.py +++ b/superset/utils/core.py @@ -1025,8 +1025,8 @@ def get_filter_key(f: Dict[str, Any]) -> str: for existing in adhoc_filters: if ( existing["expressionType"] == "SIMPLE" - and existing["comparator"] is not None - and existing["subject"] is not None + and existing.get("comparator") is not None + and existing.get("subject") is not None ): existing_filters[get_filter_key(existing)] = existing["comparator"]