You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "villebro (via GitHub)" <gi...@apache.org> on 2023/04/11 12:58:48 UTC

[GitHub] [superset] villebro commented on a diff in pull request #23641: fix: url_params cache miss with global async query

villebro commented on code in PR #23641:
URL: https://github.com/apache/superset/pull/23641#discussion_r1162780681


##########
superset/charts/data/api.py:
##########
@@ -299,6 +299,9 @@ def data_from_cache(self, cache_key: str) -> Response:
         """
         try:
             cached_data = self._load_query_context_form_from_cache(cache_key)
+            
+            # Set form_data in Flask Global as it is used as a fallback for async queries with jinja context
+            setattr(g, "form_data", cached_data)

Review Comment:
   you appear to be missing an import
   ```python
   from flask import g
   ```



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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