From c0e10f6581ca8361e11d1682cf3e83a3d7c22d9a Mon Sep 17 00:00:00 2001 From: Yongjie Zhao Date: Thu, 24 Feb 2022 18:46:10 +0800 Subject: [PATCH] fix: apply url_params in global async query --- superset/charts/data/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/superset/charts/data/api.py b/superset/charts/data/api.py index dc92d97458c41..742f3755a7a1b 100644 --- a/superset/charts/data/api.py +++ b/superset/charts/data/api.py @@ -287,6 +287,8 @@ def data_from_cache(self, cache_key: str) -> Response: """ try: cached_data = self._load_query_context_form_from_cache(cache_key) + # In order to get `url_params` in form_data(used for async queries) + setattr(g, "form_data", cached_data) query_context = self._create_query_context_from_form(cached_data) command = ChartDataCommand(query_context) command.validate()