fix(region): 支持同时指定项目切自动创建项目 (#13359)

This commit is contained in:
屈轩
2022-01-28 11:13:13 +08:00
committed by GitHub
parent b213be0ede
commit 1475e23270
-6
View File
@@ -422,12 +422,6 @@ func (manager *SCloudaccountManager) validateCreateData(
if proj.DomainId != ownerId.GetProjectDomainId() {
return input, httperrors.NewInputParameterError("Project %s(%s) not belong to domain %s(%s)", proj.Name, proj.Id, ownerId.GetProjectDomain(), ownerId.GetProjectDomainId())
}
if input.AutoCreateProject != nil && *input.AutoCreateProject {
log.Warningf("project_id and auto_create_project should not be turned on at the same time")
}
if !forceAutoCreateProject {
input.AutoCreateProject = nil
}
} else if input.AutoCreateProject == nil || !*input.AutoCreateProject {
log.Warningf("auto_create_project is off while no project_id specified")
createProject := true