mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user