diff --git a/src/main/java/com/example/sinitto/guardGuideline/service/GuardGuidelineService.java b/src/main/java/com/example/sinitto/guardGuideline/service/GuardGuidelineService.java index 69e9be77..cdd123bc 100644 --- a/src/main/java/com/example/sinitto/guardGuideline/service/GuardGuidelineService.java +++ b/src/main/java/com/example/sinitto/guardGuideline/service/GuardGuidelineService.java @@ -61,9 +61,10 @@ public List readAllGuardGuidelinesByCategoryAndCallback( Callback callback = callbackRepository.findById(callbackId) .orElseThrow(() -> new NotFoundException("존재하지 않는 콜백입니다")); - if (callback.getStatus() != Callback.Status.WAITING.name() && callback.getAssignedMemberId() != memberId) { - throw new BadRequestException("해당 콜백은 대기 상태가 아니고, 배정 시니또가 아닙니다."); + if (!callback.getStatus().equals(Callback.Status.WAITING.name()) && !callback.getAssignedMemberId().equals(memberId)) { + throw new BadRequestException("해당 콜백은 대기 상태가 아니고, 배정된 시니또가 아닙니다."); } + Long seniorId = callback.getSeniorId(); List guardGuidelines = guardGuidelineRepository.findBySeniorIdAndType(seniorId, type);