避免default secgroup不能重设

This commit is contained in:
屈轩
2019-03-22 15:21:53 +08:00
parent 24cc34db5f
commit 837ae0cd16
+1 -1
View File
@@ -802,7 +802,7 @@ func (self *SGuest) AllowPerformRevokeSecgroup(ctx context.Context, userCred mcc
func (self *SGuest) saveDefaultSecgroupId(userCred mcclient.TokenCredential, secGrpId string) error {
if secGrpId != self.SecgrpId {
diff, err := db.Update(self, func() error {
self.SecgrpId = "default"
self.SecgrpId = secGrpId
return nil
})
if err != nil {