Merge pull request #8101 from rainzm/cloudaccount/fix1

fix(region): set ownerId as userCred when can't FetchOwnerId
This commit is contained in:
yunion-ci-robot
2020-09-29 10:41:39 +08:00
committed by GitHub
+3
View File
@@ -361,6 +361,9 @@ func (scm *SCloudaccountManager) PerformPrepareNets(ctx context.Context, userCre
if err != nil {
return output, errors.Wrap(err, "FetchOwnerId in PerformPrepareNets")
}
if ownerId == nil {
ownerId = userCred
}
input.CloudaccountCreateInput, err = scm.ValidateCreateData(ctx, userCred, ownerId, query, input.CloudaccountCreateInput)
if err != nil {
return output, err