fix: student category mapping from the program enrollment tool (#26716) (#26739)

Co-authored-by: Jannat Patel <31363128+pateljannat@users.noreply.github.com>
(cherry picked from commit 1a2332a81c)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
This commit is contained in:
Frappe PR Bot
2021-07-30 18:54:35 +05:30
committed by GitHub
parent 2d6f2fea5b
commit b5c7fce689
2 changed files with 64 additions and 188 deletions

View File

@@ -34,11 +34,14 @@ def enroll_student(source_name):
}
}}, ignore_permissions=True)
student.save()
student_applicant = frappe.db.get_value("Student Applicant", source_name,
["student_category", "program"], as_dict=True)
program_enrollment = frappe.new_doc("Program Enrollment")
program_enrollment.student = student.name
program_enrollment.student_category = student.student_category
program_enrollment.student_category = student_applicant.student_category
program_enrollment.student_name = student.title
program_enrollment.program = frappe.db.get_value("Student Applicant", source_name, "program")
program_enrollment.program = student_applicant.program
frappe.publish_realtime('enroll_student_progress', {"progress": [2, 4]}, user=frappe.session.user)
return program_enrollment