diff --git a/pkg/monitor/models/alertrecord.go b/pkg/monitor/models/alertrecord.go index cb7cb68a98..4aff405a70 100644 --- a/pkg/monitor/models/alertrecord.go +++ b/pkg/monitor/models/alertrecord.go @@ -137,11 +137,14 @@ func (man *SAlertRecordManager) FetchCustomizeColumns( func (record *SAlertRecord) GetMoreDetails(out monitor.AlertRecordDetails) (monitor.AlertRecordDetails, error) { evalMatchs := make([]monitor.EvalMatch, 0) - err := record.EvalData.Unmarshal(evalMatchs) - if err != nil { - return out, errors.Wrap(err, "record Unmarshal evalMatchs error") + if record.EvalData != nil { + err := record.EvalData.Unmarshal(&evalMatchs) + if err != nil { + return out, errors.Wrap(err, "record Unmarshal evalMatchs error") + } + out.ResNum = int64(len(evalMatchs)) } - out.ResNum = int64(len(evalMatchs)) + return out, nil }