From cd604484f3d9c81181d868e7cfa028e811aba679 Mon Sep 17 00:00:00 2001 From: lai <11598235+unique0lai@users.noreply.github.com> Date: Wed, 12 Jun 2024 16:24:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bmw=20cmdb=E7=BC=93=E5=AD=98=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=85=BC=E5=AE=B9=E7=A9=BA=E7=9A=84=E6=8B=93=E6=89=91?= =?UTF-8?q?=E6=A0=91=20--bug=3D125655527=20(#370)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/bk-monitor-worker/internal/alarm/cmdbcache/host.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/bk-monitor-worker/internal/alarm/cmdbcache/host.go b/pkg/bk-monitor-worker/internal/alarm/cmdbcache/host.go index 696af0e20..f3078025d 100644 --- a/pkg/bk-monitor-worker/internal/alarm/cmdbcache/host.go +++ b/pkg/bk-monitor-worker/internal/alarm/cmdbcache/host.go @@ -516,6 +516,10 @@ func getHostAndTopoByBiz(ctx context.Context, bkBizID int) ([]*AlarmHostInfo, *c return nil, nil, err } + if len(bizInstTopoResp.Data) == 0 { + return hosts, nil, nil + } + // 查询业务下的内置节点 var bizInternalModuleResp cmdb.GetBizInternalModuleResp _, err = cmdbApi.GetBizInternalModule().SetBody(map[string]interface{}{"bk_biz_id": bkBizID}).SetResult(&bizInternalModuleResp).Request()