bito-code-review[bot] commented on code in PR #40473:
URL: https://github.com/apache/superset/pull/40473#discussion_r3362915954


##########
superset/mcp_service/dashboard/tool/get_dashboard_info.py:
##########
@@ -247,6 +249,21 @@ async def get_dashboard_info(
                     result.is_permalink_state,
                 )
             )
+            # When permalink_key is supplied and the caller did not explicitly
+            # override select_columns, ensure filter_state is present so the
+            # caller gets the data they came for.
+            effective_select_columns = list(request.select_columns)
+            if (
+                request.permalink_key
+                and effective_select_columns == 
list(DEFAULT_GET_DASHBOARD_INFO_COLUMNS)
+                and "filter_state" not in effective_select_columns

Review Comment:
   <!-- Bito Reply -->
   The suggestion to remove the redundant condition is appropriate. Since the 
preceding check `effective_select_columns == 
list(DEFAULT_GET_DASHBOARD_INFO_COLUMNS)` already ensures the list matches the 
default columns, and those defaults do not include `filter_state`, the 
membership test `and "filter_state" not in effective_select_columns` was indeed 
always true and unnecessary.
   
   **superset/mcp_service/dashboard/tool/get_dashboard_info.py**
   ```
   if (
                   request.permalink_key
                   and effective_select_columns == 
list(DEFAULT_GET_DASHBOARD_INFO_COLUMNS)
               ):
   ```



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