fix: 历史告警同步判断存在错误

This commit is contained in:
TsMask
2024-09-24 10:06:54 +08:00
parent d69a7c9e6f
commit 070c6ff4de

View File

@@ -595,7 +595,7 @@ func GetAlarmFromNF(w http.ResponseWriter, r *http.Request) {
exist, err := session.Table("alarm").
Where("ne_type=? and ne_id=? and alarm_id=? and alarm_status=1", alarmData.NeType, alarmData.NeId, alarmData.AlarmId).
Exist()
if err == nil || !exist {
if err != nil || !exist {
log.Infof("Not found active alarm: ne_id=%s, alarm_id=%s", alarmData.NeId, alarmData.AlarmId)
continue
}