mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Fix state cache getOrCreate panic (#33777)
This commit is contained in:
parent
b5b8877253
commit
fae093bbe2
@ -47,6 +47,8 @@ func (c *cache) getOrCreate(alertRule *ngModels.AlertRule, result eval.Result) *
|
||||
|
||||
if _, ok := c.states[alertRule.OrgID]; !ok {
|
||||
c.states[alertRule.OrgID] = make(map[string]map[string]*State)
|
||||
}
|
||||
if _, ok := c.states[alertRule.OrgID][alertRule.UID]; !ok {
|
||||
c.states[alertRule.OrgID][alertRule.UID] = make(map[string]*State)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user