Fix incorrect condition for empty rate limits in AlertGroup

This commit is contained in:
2026-02-24 23:05:40 +05:00
parent 2e08bf6b6a
commit 8f254d11c1

View File

@@ -17,7 +17,7 @@ type AlertGroup struct {
func (g *AlertGroup) RateLimit(level uint64) (rateLimit RateLimit, err error) {
lenRateLimits := len(g.RateLimits) - 1
if lenRateLimits == 0 {
if lenRateLimits < 0 {
return RateLimit{}, fmt.Errorf("rate limits is empty")
}