fix: for backward compatility, only check account id consistency for non-empty account id

This commit is contained in:
Qiu Jian
2019-09-03 21:17:33 +08:00
parent ea5b3a2d40
commit fc6e693dcf
+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)
}