Skip to content

Commit 35030ed

Browse files
authored
Merge pull request #2680 from AkshataKatwal16/release-1.15.0
Issue feat: teannatchort id mapping payload issue while create learner
2 parents 3c3b06d + e75ab19 commit 35030ed

File tree

1 file changed

+6
-0
lines changed
  • mfes/scp-teacher-repo/src/components/EntityForms/AddEditUser

1 file changed

+6
-0
lines changed

mfes/scp-teacher-repo/src/components/EntityForms/AddEditUser/AddEditUser.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,12 @@ const AddEditUser = ({
471471
};
472472
}
473473

474+
// Ensure batch is included from formData or prefilledFormData if missing from payload
475+
// This handles cases where hidden fields might not be included in the submitted payload
476+
if (!payload.batch && (formData?.batch || editPrefilledFormData?.batch)) {
477+
payload.batch = formData?.batch || editPrefilledFormData?.batch;
478+
}
479+
474480
if (payload.batch) {
475481
const cohortIds = payload.batch;
476482
// payload.tenantCohortRoleMapping.push(cohortIds);

0 commit comments

Comments
 (0)