Skip to content

Commit

Permalink
[stream] 项目支持关联到运营产品 #9948 优化
Browse files Browse the repository at this point in the history
  • Loading branch information
yongyiduan committed Nov 18, 2024
1 parent b52da2d commit 24d37f2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
package com.tencent.devops.project.resources

import com.tencent.bk.audit.annotations.AuditEntry
import com.tencent.devops.common.api.exception.ParamBlankException
import com.tencent.devops.common.auth.api.ActionId
import com.tencent.devops.common.auth.api.ActionId.PROJECT_CREATE
import com.tencent.devops.common.auth.api.AuthPermission
Expand All @@ -37,14 +38,14 @@ import com.tencent.devops.common.web.RestResource
import com.tencent.devops.project.api.service.ServiceProjectResource
import com.tencent.devops.project.pojo.OrgInfo
import com.tencent.devops.project.pojo.ProjectBaseInfo
import com.tencent.devops.project.pojo.ProjectByConditionDTO
import com.tencent.devops.project.pojo.ProjectCreateExtInfo
import com.tencent.devops.project.pojo.ProjectCreateInfo
import com.tencent.devops.project.pojo.ProjectCreateUserInfo
import com.tencent.devops.project.pojo.ProjectOrganizationInfo
import com.tencent.devops.project.pojo.ProjectProperties
import com.tencent.devops.project.pojo.ProjectUpdateInfo
import com.tencent.devops.project.pojo.ProjectVO
import com.tencent.devops.project.pojo.ProjectByConditionDTO
import com.tencent.devops.project.pojo.Result
import com.tencent.devops.project.pojo.enums.PluginDetailsDisplayOrder
import com.tencent.devops.project.pojo.enums.ProjectChannelCode
Expand Down Expand Up @@ -257,6 +258,9 @@ class ServiceProjectResourceImpl @Autowired constructor(
projectCode: String,
projectOrganizationInfo: ProjectOrganizationInfo
): Result<Boolean> {
if (projectOrganizationInfo.bgId == null || projectOrganizationInfo.bgName.isNullOrBlank()) {
throw ParamBlankException("bgId or bgName must be not null.")
}
projectService.updateOrganizationByEnglishName(
englishName = projectCode,
projectOrganizationInfo = projectOrganizationInfo
Expand Down

0 comments on commit 24d37f2

Please sign in to comment.