Merge pull request #1156 from quyuancheng/fixbug-560

Unexpected error occorred while updating http rule
This commit is contained in:
yangkaa 2022-03-31 11:38:49 +08:00 committed by GitHub
commit cff8cd8b39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)