diff --git a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GradStudentService.java b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GradStudentService.java index 33eebc16..c7c15d17 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GradStudentService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GradStudentService.java @@ -408,22 +408,15 @@ public List getStudentIDsByStatusCode(List studentIDs, String status public List getStudentIDsBySearchCriteriaOrAll(StudentSearchRequest searchRequest) { ArrayList result = new ArrayList<>(); - boolean paramsNotEmpty = false; if(searchRequest.getStudentIDs() != null && !searchRequest.getStudentIDs().isEmpty()) { - paramsNotEmpty = true; result.addAll(searchRequest.getStudentIDs()); } if(searchRequest.getPens() != null && !searchRequest.getPens().isEmpty()) { - paramsNotEmpty = true; result.addAll(graduationStatusRepository.findStudentIDsByPenIn(searchRequest.getPens())); } if(searchRequest.getSchoolOfRecords() != null && !searchRequest.getSchoolOfRecords().isEmpty()) { - paramsNotEmpty = true; result.addAll(graduationStatusRepository.findBySchoolOfRecordIn(searchRequest.getSchoolOfRecords())); } - if(!paramsNotEmpty) { - result.addAll(graduationStatusRepository.findAllStudentGuids()); - } return result; } }