trentontrees commented on code in PR #34418:
URL: https://github.com/apache/superset/pull/34418#discussion_r2260940557


##########
superset/commands/dashboard/importers/v1/utils.py:
##########
@@ -139,7 +139,47 @@ def update_id_refs(  # pylint: disable=too-many-locals  # 
noqa: C901
             native_filter["scope"]["excluded"] = [
                 id_map[old_id] for old_id in scope_excluded if old_id in id_map
             ]
+    fixed = update_cross_filter_scoping(fixed, id_map)
+    return fixed
+
 
+def update_cross_filter_scoping(
+    config: dict[str, Any], id_map: dict[int, int]
+) -> dict[str, Any]:
+    # fix cross filter references
+    fixed = config.copy()
+
+    cross_filter_global_config = fixed.get("metadata", {}).get(
+        "global_chart_configuration", {}
+    )
+    scope_excluded = cross_filter_global_config.get("scope", 
{}).get("excluded", [])
+    if scope_excluded:
+        cross_filter_global_config["scope"]["excluded"] = [
+            id_map[old_id] for old_id in scope_excluded if old_id in id_map
+        ]
+
+    if "chart_configuration" in (metadata := fixed.get("metadata", {})):

Review Comment:
   won't fix.  pre-commit forces to this walrus style.



-- 
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-unsubscr...@superset.apache.org

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


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

Reply via email to