mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #2823 from ioito/hotfix/qx-add-secgroup
fix: 修复安全组关联数量校验不正确问题
This commit is contained in:
@@ -941,7 +941,7 @@ func (self *SGuest) PerformAddSecgroup(ctx context.Context, userCred mcclient.To
|
||||
}
|
||||
|
||||
originSecgroups := self.GetSecgroups()
|
||||
if len(originSecgroups)+len(secgrpJsonArray) >= maxCount {
|
||||
if len(originSecgroups)+len(secgrpJsonArray) > maxCount {
|
||||
return nil, httperrors.NewUnsupportOperationError("guest %s band to up to %d security groups", self.Name, maxCount)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user