Merge pull request #2736 from swordqiu/hotfix/qj-check-account-id-consistency-for-non-empty-account-id

fix: for backward compatility, only check account id consistency for non-empty account id
This commit is contained in:
yunion-ci-robot
2019-09-04 10:03:16 +08:00
committed by GitHub
+2 -1
View File
@@ -445,7 +445,8 @@ func (self *SCloudaccount) PerformUpdateCredential(ctx context.Context, userCred
if err != nil {
return nil, httperrors.NewInputParameterError("invalid cloud account info error: %s", err.Error())
}
if accountId != self.AccountId {
// for backward compatibility
if len(self.AccountId) > 0 && accountId != self.AccountId {
return nil, httperrors.NewConflictError("inconsistent account_id, previous '%s' and now '%s'", self.AccountId, accountId)
}