From 5e2d362c998c98168af8fe99eff128faa4dca4d1 Mon Sep 17 00:00:00 2001 From: tangjiawei Date: Tue, 22 Oct 2024 12:02:20 +0800 Subject: [PATCH] #830 custom template bug --- monitor-server/services/db/log_metric.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/monitor-server/services/db/log_metric.go b/monitor-server/services/db/log_metric.go index da2fdd818..a5dd3c049 100644 --- a/monitor-server/services/db/log_metric.go +++ b/monitor-server/services/db/log_metric.go @@ -1739,6 +1739,9 @@ func getCreateLogMetricCustomGroupActions(param *models.LogMetricGroupObj, opera } nowTime := time.Now() result = &models.CreateLogMetricGroupDto{AlarmList: []string{}} + if param.LogMonitorTemplateGuid == "" && param.LogMonitorTemplate != "" { + param.LogMonitorTemplateGuid = param.LogMonitorTemplate + } if strings.TrimSpace(param.LogMonitorTemplateGuid) != "" { if logMonitorTemplate, err = GetLogMonitorTemplate(param.LogMonitorTemplateGuid); err != nil { return