From e7def7e0e25caf09fbe33f8019db413686e349bc Mon Sep 17 00:00:00 2001 From: bryanck Date: Wed, 20 Jan 2021 14:22:05 -0800 Subject: [PATCH] fix: missing key when verifying adhoc filters in merge_extra_filters (#12620) Co-authored-by: Bryan Keller --- superset/utils/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"]