rusackas commented on code in PR #42910:
URL: https://github.com/apache/superset/pull/42910#discussion_r4407984968
##########
superset/mcp_service/chart/chart_utils.py:
##########
@@ -3844,6 +3854,10 @@ def merge_bullet_form_data(
for values_key, labels_key in dependent_controls.items():
if values_key in new_form_data and labels_key not in new_form_data:
new_form_data[labels_key] = ""
+ # Per-band colors are applied by position, so replacing the thresholds
+ # without colors must not re-apply the old colors to the new bands.
+ if "ranges" in new_form_data and "range_colors" not in new_form_data:
Review Comment:
Good catch @sadpandajoe. The reset now only applies when the new `ranges`
differs from the saved value, so repeating the same thresholds keeps
`range_colors`. Added a test for both cases.
--
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]