Skip to content

Commit a7f9d12

Browse files
authored
Merge pull request #606 from TaskFlow-CLAP/CLAP-484
CLAP-484 구분 수정시 이름 중복 검증 logic 수정
2 parents 04b8841 + 7172943 commit a7f9d12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/clap/server/application/service/label/ManageLabelService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ public void editLabel(Long adminId, Long labelId, EditLabelRequest request) {
2929
Label label = loadLabelPort.findById(labelId)
3030
.orElseThrow(() -> new ApplicationException(LabelErrorCode.LABEL_NOT_FOUND));
3131

32-
loadLabelPort.existsByLabelName(request.labelName());
32+
if (loadLabelPort.existsByLabelName(request.labelName())) {
33+
throw new ApplicationException(LabelErrorCode.DUPLICATE_LABEL_NAME);
34+
};
3335

3436
label.updateLabel(request);
3537
commandLabelPort.save(label);

0 commit comments

Comments
 (0)