aminghadersohi commented on code in PR #44618:
URL: https://github.com/apache/superset/pull/44618#discussion_r4107252839


##########
tests/unit_tests/mcp_service/chart/test_chart_utils.py:
##########
@@ -105,6 +105,61 @@ def test_merge_chart_preserves_omitted_defaults(
     assert merged["metric"] == new_form_data["metric"]
 
 
[email protected](
+    "updates,expected",
+    [
+        ({}, {"color_scheme": "lyftColors", "row_limit": 42}),
+        (
+            {"color_scheme": "googleCategory10c", "row_limit": 200},
+            {"color_scheme": "googleCategory10c", "row_limit": 200},
+        ),

Review Comment:
   The pie twin at :60 carries a third case this one drops: an explicit 
`color_scheme: None` must clear to `supersetColors`, not inherit `lyftColors`. 
That leaves the explicit-null contract unpinned — 
`model_dump(exclude_unset=True, exclude_none=True)` passes both cases here and 
fails that one.
   
   ```suggestion
           (
               {"color_scheme": "googleCategory10c", "row_limit": 200},
               {"color_scheme": "googleCategory10c", "row_limit": 200},
           ),
           (
               {"color_scheme": None, "row_limit": 100},
               {"color_scheme": "supersetColors", "row_limit": 100},
           ),
   ```



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