bito-code-review[bot] commented on PR #41214:
URL: https://github.com/apache/superset/pull/41214#issuecomment-4747145749

   <!-- Bito Reply -->
   The observation is correct. By removing the `chartsInScope` check entirely, 
the function now relies solely on the `scope` dictionary. If `scope` is missing 
or malformed (e.g., not a dictionary), `scope.get("rootPath", [])` defaults to 
an empty list, causing the filter to be incorrectly excluded for all charts. 
Using `chartsInScope` as a fallback when `scope` is missing or invalid would 
preserve backward compatibility for older dashboard metadata while still 
allowing the intended fix for stale cache issues.
   
   **superset/charts/data/dashboard_filter_context.py**
   ```
   scope = filter_config.get("scope")
       if isinstance(scope, dict):
           root_path: list[str] = scope.get("rootPath", [])
           excluded: list[int] = scope.get("excluded", [])
       else:
           # Fallback to chartsInScope if scope is missing or invalid
           charts_in_scope = filter_config.get("chartsInScope")
           if isinstance(charts_in_scope, list):
               return chart_id in charts_in_scope
           return False
   ```


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