Vitor-Avila commented on code in PR #41290:
URL: https://github.com/apache/superset/pull/41290#discussion_r3455008206


##########
superset/charts/data/dashboard_filter_context.py:
##########
@@ -332,6 +332,18 @@ def apply_dashboard_filter_context(
         for key in EXTRA_FORM_DATA_OVERRIDE_EXTRA_KEYS:
             if key in extra_form_data:
                 extras[key] = extra_form_data[key]
+
+        # EXTRA_FORM_DATA_OVERRIDE_EXTRA_KEYS is originally used with 
form_data objects,
+        # not query_context objects. form_data objects expect time_grain_sqla 
as a
+        # top-level key, but query_context objects expect it as an extra key.
+        if custom_time_grain := extra_form_data.get("time_grain_sqla"):
+            extras["time_grain_sqla"] = custom_time_grain
+            # Inject ``filter_timegrain`` into X-Axis column

Review Comment:
   I disagree. It points to the original source, which is the filter type.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to