mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #491 from swordqiu/hotfix/qj-server-update-validate-skip-quota-check-if-cpu-mem-not-set
fix: skip quota check in server validateupdatedata if cpu and mem not updated
This commit is contained in:
@@ -798,9 +798,11 @@ func (self *SGuest) ValidateUpdateData(ctx context.Context, userCred mcclient.To
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = self.checkUpdateQuota(ctx, userCred, vcpuCount, vmemSize)
|
||||
if err != nil {
|
||||
return nil, httperrors.NewOutOfQuotaError(err.Error())
|
||||
if vcpuCount > 0 || vmemSize > 0 {
|
||||
err = self.checkUpdateQuota(ctx, userCred, vcpuCount, vmemSize)
|
||||
if err != nil {
|
||||
return nil, httperrors.NewOutOfQuotaError(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
if data.Contains("name") {
|
||||
|
||||
Reference in New Issue
Block a user