Skip to content

Commit

Permalink
Update MemberService.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Divyansh123bn authored Oct 3, 2024
1 parent d3189b2 commit 1ad50e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/libraryman_api/member/MemberService.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void deleteMember(int memberId) {
.orElseThrow(() -> new ResourceNotFoundException("Member not found"));

// Check for outstanding fines
List<Fine> outstandingFines = fineRepository.findByMemberIdAndIsPaidFalse(memberId);
List<Fines> outstandingFines = fineRepository.findByMemberIdAndIsPaidFalse(memberId);
if (!outstandingFines.isEmpty()) {
throw new MemberDeletionException("Cannot delete member with outstanding fines.");
}
Expand Down

0 comments on commit 1ad50e9

Please sign in to comment.