fix(region): set ownerId as userCred when can't FetchOwnerId

This commit is contained in:
rainzm
2020-09-25 20:33:44 +08:00
parent 96ecfde984
commit dbb1d80729
+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