Skip to content

Commit

Permalink
pref:优化标签组/标签重名时的报错提示 #9312
Browse files Browse the repository at this point in the history
  • Loading branch information
yjieliang committed Aug 11, 2023
1 parent 2e40d16 commit 2ce1e14
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class PipelineGroupService @Autowired constructor(

fun addGroup(userId: String, pipelineGroup: PipelineGroupCreate): Boolean {
val count = pipelineGroupDao.countByName(dslContext, pipelineGroup.projectId, pipelineGroup.name)
if (count >= 1 ) {
if (count >= 1) {
logger.warn("Fail to create the group $pipelineGroup by userId $userId")
throw ErrorCodeException(
errorCode = GROUP_IS_EXIST,
Expand All @@ -165,7 +165,7 @@ class PipelineGroupService @Autowired constructor(

fun updateGroup(userId: String, pipelineGroup: PipelineGroupUpdate): Boolean {
val count = pipelineGroupDao.countByName(dslContext, pipelineGroup.projectId, pipelineGroup.name)
if (count >= 1 ) {
if (count >= 1) {
logger.warn("Fail to create the group $pipelineGroup by userId $userId")
throw ErrorCodeException(
errorCode = GROUP_IS_EXIST,
Expand Down

0 comments on commit 2ce1e14

Please sign in to comment.