codeant-ai-for-open-source[bot] commented on code in PR #45530:
URL: https://github.com/apache/superset/pull/45530#discussion_r4330706843


##########
superset/daos/dashboard.py:
##########
@@ -323,6 +323,94 @@ def reconcile_position_json(positions: object, 
dashboard_id: int | None = None)
     )
 
 
+def _remap_copy_chart_ids(values: list[Any], key_map: dict[str, int]) -> 
list[int]:
+    """Drop omitted chart references and use clone IDs when applicable."""
+    new_id: int | None
+    return [
+        new_id for value in values if (new_id := key_map.get(str(value))) is 
not None

Review Comment:
   ✅ **Customized review instruction saved!**
   
   **Instruction:**
   > Do not flag string-key lookup of chart IDs in dashboard copy logic for 
whole-number float IDs; dashboard metadata and position JSON encode these IDs 
as integers, and malformed references are safely dropped.
   
   **Applied to:**
     - `superset/daos/dashboard.py`
   
   ---
   💡 *To manage or update this instruction, visit: [CodeAnt AI 
Settings](https://app.codeant.ai/org/settings/learnings)*



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