Skip to content

Commit

Permalink
Merge pull request #11222 from yongyiduan/issue_9948
Browse files Browse the repository at this point in the history
[stream] 项目支持关联到运营产品 #9948 优化
  • Loading branch information
bkci-bot authored Dec 12, 2024
2 parents 919dc18 + 24d37f2 commit bfd270f
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 bfd270f

Please sign in to comment.