File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
back/src/main/java/com/back/domain/mentoring/reservation/entity Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 77import com .back .domain .mentoring .reservation .constant .ReservationStatus ;
88import com .back .domain .mentoring .reservation .error .ReservationErrorCode ;
99import com .back .domain .mentoring .slot .entity .MentorSlot ;
10+ import com .back .global .app .AppConfig ;
1011import com .back .global .exception .ServiceException ;
1112import com .back .global .jpa .BaseEntity ;
1213import jakarta .persistence .*;
@@ -132,6 +133,10 @@ private void ensureCanComplete() {
132133 if (!this .status .canComplete ()) {
133134 throw new ServiceException (ReservationErrorCode .CANNOT_COMPLETE );
134135 }
136+ // 개발·테스트 환경에서는 검증 스킵 (Swagger 테스트 허용)
137+ if (AppConfig .isDev () || AppConfig .isTest ()) {
138+ return ;
139+ }
135140 // 시작 이후 완료 가능 (조기 종료 허용)
136141 if (!mentorSlot .isPast ()) {
137142 throw new ServiceException (ReservationErrorCode .MENTORING_NOT_STARTED );
You can’t perform that action at this time.
0 commit comments