bito-code-review[bot] commented on PR #43568:
URL: https://github.com/apache/superset/pull/43568#issuecomment-5438282517
<!-- Bito Reply -->
The suggestion to validate that `min_val` is less than `max_val` in
`GaugeChartConfig` is correct. You can implement this by adding a model
validator to the `GaugeChartConfig` class in
`superset/mcp_service/chart/schemas.py`.
**superset/mcp_service/chart/schemas.py**
```
@model_validator(mode="after")
def validate_scale_bounds(self) -> "GaugeChartConfig":
if self.min_val is not None and self.max_val is not None and
self.min_val >= self.max_val:
raise ValueError("min_val must be less than max_val")
return self
```
--
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]