john-bodley commented on a change in pull request #9311: [cache warm_up]
warm_up slice with dashboard default_filters
URL:
https://github.com/apache/incubator-superset/pull/9311#discussion_r394101165
##########
File path: superset/tasks/cache.py
##########
@@ -54,35 +56,27 @@ def get_form_data(chart_id, dashboard=None):
if not default_filters:
return form_data
- # do not apply filters if chart is immune to them
- immune_fields = []
filter_scopes = json_metadata.get("filter_scopes", {})
- if filter_scopes:
- for scopes in filter_scopes.values():
- for (field, scope) in scopes.items():
- if chart_id in scope.get("immune", []):
- immune_fields.append(field)
-
- extra_filters = []
- for filters in default_filters.values():
- for col, val in filters.items():
- if col not in immune_fields:
- extra_filters.append({"col": col, "op": "in", "val": val})
+ layout = json.loads(dashboard.position_json or "{}")
+ # do not apply filters if chart is immune to them
Review comment:
Nit. I would nix the comment as the following function has not reference to
immunity.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]