Skip to content

Commit 1553c88

Browse files
Merge pull request #117 from bcgov/fix/student-course-deletion
Search student courses by pen with white space
2 parents 070f810 + 77fc478 commit 1553c88

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/src/main/java/ca/bc/gov/educ/api/pen/replication/service/StudentCourseUpdateService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void processEvent(final StudentCourseUpdate studentCourseUpdate, final Ev
4949
var studentPEN = restUtils.getStudentPen(studentCourseUpdate.getStudentID());
5050
val existingTraxStudentRecord = this.traxStudentService.findTraxStudentByPen(StringUtils.rightPad(studentPEN, 10));
5151
if (existingTraxStudentRecord.isPresent()) {
52-
var existingCourses = this.traxStudentCourseService.findTraxStudentCoursesByPen(studentPEN);
52+
var existingCourses = this.traxStudentCourseService.findTraxStudentCoursesByPen(StringUtils.rightPad(studentPEN, 10));
5353
existingCourses = existingCourses.stream().filter(Objects::nonNull).toList();
5454
this.traxStudentCourseService.deletePriorAndSaveTraxStudentCourses(existingCourses, getStudentCourseEntityList(studentPEN, studentCourseUpdate.getStudentCourses(), existingCourses));
5555
log.info("Processing choreography update event with ID {} :: payload is: {}", event.getEventId(), studentCourseUpdate);

0 commit comments

Comments
 (0)