feat(alerting): sql update fixes

This commit is contained in:
Torkel Ödegaard
2016-06-11 14:08:55 +02:00
parent 71c1c0ab65
commit 66c2594262
3 changed files with 6 additions and 3 deletions

View File

@@ -184,6 +184,7 @@ func upsertAlerts(alerts []*m.Alert, posted []*m.Alert, sess *xorm.Session) erro
update = true
alert.Id = k.Id
alertToUpdate = k
break
}
}
@@ -224,6 +225,7 @@ func deleteMissingAlerts(alerts []*m.Alert, posted []*m.Alert, sess *xorm.Sessio
for _, k := range posted {
if missingAlert.PanelId == k.PanelId {
missing = false
break
}
}