diff --git a/backend/src/main/java/org/ftclub/cabinet/presentation/service/PresentationService.java b/backend/src/main/java/org/ftclub/cabinet/presentation/service/PresentationService.java index 2eefab16e..2fba896ac 100644 --- a/backend/src/main/java/org/ftclub/cabinet/presentation/service/PresentationService.java +++ b/backend/src/main/java/org/ftclub/cabinet/presentation/service/PresentationService.java @@ -211,11 +211,19 @@ public void updatePresentationByFormId(Long formId, PresentationUpdateDto dto) { Presentation presentationToUpdate = presentationRepository.findById(formId) .orElseThrow(ExceptionStatus.INVALID_FORM_ID::asServiceException); - //날짜 변경시에만 유효성 검증 + + // 날짜 변경시에만 유효성 검증 if (!presentationToUpdate.getDateTime().isEqual(dto.getDateTime())) { presentationPolicyService.verifyReservationDate(dto.getDateTime()); } + // 발표 취소 시 해당 날짜에 더미 폼 생성 + if (dto.getStatus() == PresentationStatus.CANCEL) { + Presentation presentation = Presentation.of(Category.DUMMY, dto.getDateTime(), + PresentationTime.HALF, "dummy", "dummy", "dummy"); + presentationRepository.save(presentation); + } + presentationToUpdate.adminUpdate(dto.getStatus(), dto.getDateTime(), dto.getLocation()); }