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 2020/03/23 17:44:15 UTC

[GitHub] [incubator-superset] mistercrunch commented on a change in pull request #9348: fix: filter_values in jinja_context not processing adhoc_filters

mistercrunch commented on a change in pull request #9348: fix: filter_values in jinja_context not processing adhoc_filters
URL: https://github.com/apache/incubator-superset/pull/9348#discussion_r396637763
 
 

 ##########
 File path: superset/jinja_context.py
 ##########
 @@ -93,18 +94,16 @@ def filter_values(column: str, default: Optional[str] = None) -> List[str]:
     :return: returns a list of filter values
     """
     form_data = json.loads(request.form.get("form_data", "{}"))
+    utils.harmonize_query_filters(form_data)
+
     return_val = []
-    for filter_type in ["filters", "extra_filters"]:
-        if filter_type not in form_data:
-            continue
-
-        for f in form_data[filter_type]:
-            if f["col"] == column:
-                if isinstance(f["val"], list):
-                    for v in f["val"]:
-                        return_val.append(v)
-                else:
-                    return_val.append(f["val"])
+    for f in form_data.get("filters", {}):
 
 Review comment:
   I was working on filters recently and I'm pretty sure these are now under `adhoc_filters`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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