Skip to content

Commit

Permalink
GRAD2-2570: the issue with pen list search is fixed not to filter nul…
Browse files Browse the repository at this point in the history
…l distribution date out.

GRAD2-2570: the issue with pen list search is fixed not to filter null distribution date out.
  • Loading branch information
infstar committed Apr 23, 2024
1 parent af68b0d commit db06217
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Objects;
import java.util.UUID;

@CrossOrigin
Expand Down Expand Up @@ -287,8 +288,10 @@ public ResponseEntity<List<StudentCredentialDistribution>> getStudentCredentials
public ResponseEntity<List<StudentCredentialDistribution>> getStudentCredentialsForUserRequestDisRunWithNullDistributionDate(
@PathVariable String credentialType, @RequestBody StudentSearchRequest studentSearchRequest,
@RequestHeader(name="Authorization") String accessToken) {
logger.debug("getStudentCredentialsForRegenCertRun : ");
return response.GET(commonService.getStudentCredentialsForUserRequestDisRun(credentialType,studentSearchRequest,true,accessToken.replace(BEARER, "")));
logger.debug("getStudentCredentialsForUserRequestDisRunWithNullDistributionDate : ");
boolean isPenNumberSearch = studentSearchRequest.getPens()!= null && !studentSearchRequest.getPens().isEmpty()
&& !studentSearchRequest.getPens().stream().filter(StringUtils::isNotBlank).toList().isEmpty();
return response.GET(commonService.getStudentCredentialsForUserRequestDisRun(credentialType,studentSearchRequest,!isPenNumberSearch,accessToken.replace(BEARER, "")));
}

@DeleteMapping(EducGradReportApiConstants.ARCH_ACHIEVEMENTS_BY_STUDENTID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ public void testGetAllStudentCredentialDistributionListWithNullDistributionDate(
final UUID studentID = UUID.randomUUID();
final String credentialType = "E";
final StudentSearchRequest req = new StudentSearchRequest();
req.setPens(List.of("2131231213"));
req.setDistricts(List.of("005"));

// Student Certificate Types
final List<StudentCredentialDistribution> list = new ArrayList<>();
Expand Down

0 comments on commit db06217

Please sign in to comment.