From 6b4364077e6819c4210975289b230b5427715eff Mon Sep 17 00:00:00 2001 From: quyc Date: Thu, 31 Mar 2022 11:03:37 +0800 Subject: [PATCH] Unexpected error occorred while updating http rule --- api/handler/gateway_action.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/handler/gateway_action.go b/api/handler/gateway_action.go index 38e5964aa..b390eadf4 100644 --- a/api/handler/gateway_action.go +++ b/api/handler/gateway_action.go @@ -1013,7 +1013,7 @@ func (g *GatewayAction) SyncTCPRules(tx *gorm.DB, components []*apimodel.Compone tcpRules []*model.TCPRule ) for _, component := range components { - if component.TCPRules == nil { + if len(component.TCPRules) == 0 { continue } componentIDs = append(componentIDs, component.ComponentBase.ComponentID)