Skip to content

Commit 274be9b

Browse files
committed
EDX-3062: Bug fix
1 parent 1f05132 commit 274be9b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

backend/src/components/sdc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,22 @@ function setDuplicateResponsePayload(req, sdcDuplicates, isProvincialDuplicate,
879879
toTableRow(sdcDuplicate.sdcSchoolCollectionStudent1Entity);
880880
toTableRow(sdcDuplicate.sdcSchoolCollectionStudent2Entity);
881881

882+
if (sdcDuplicate.sdcSchoolCollectionStudent2Entity?.enrolledProgramCodes) {
883+
sdcDuplicate.sdcSchoolCollectionStudent2Entity.enrolledProgramCodes = sdcDuplicate?.sdcSchoolCollectionStudent2Entity?.enrolledProgramCodes.match(/.{1,2}/g);
884+
}
885+
886+
if (sdcDuplicate.sdcSchoolCollectionStudent2Entity?.numberOfCourses) {
887+
sdcDuplicate.sdcSchoolCollectionStudent2Entity.numberOfCourses = formatNumberOfCourses(sdcDuplicate.sdcSchoolCollectionStudent2Entity?.numberOfCourses);
888+
}
889+
890+
if (sdcDuplicate.sdcSchoolCollectionStudent1Entity?.enrolledProgramCodes) {
891+
sdcDuplicate.sdcSchoolCollectionStudent1Entity.enrolledProgramCodes = sdcDuplicate.sdcSchoolCollectionStudent1Entity?.enrolledProgramCodes.match(/.{1,2}/g);
892+
}
893+
894+
if (sdcDuplicate.sdcSchoolCollectionStudent1Entity?.numberOfCourses) {
895+
sdcDuplicate.sdcSchoolCollectionStudent1Entity.numberOfCourses = formatNumberOfCourses(sdcDuplicate.sdcSchoolCollectionStudent1Entity?.numberOfCourses);
896+
}
897+
882898
if (sdcDuplicate?.duplicateTypeCode === DUPLICATE_TYPE_CODES.ENROLLMENT) {
883899
setIfOnlineStudentAndCanChangeGrade(sdcDuplicate, school1, school2);
884900
setCanMoveToCrossEnrollment(sdcDuplicate);

0 commit comments

Comments
 (0)