Skip to content

Commit

Permalink
fix: lms progress issue (frappe#26254)
Browse files Browse the repository at this point in the history
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
  • Loading branch information
pateljannat and ruchamahabal committed Jul 2, 2021
1 parent ee7de6b commit dfc6895
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/education/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,11 @@ def get_or_create_course_enrollment(course, program):
student = get_current_student()
course_enrollment = get_enrollment("course", course, student.name)
if not course_enrollment:
program_enrollment = get_enrollment('program', program, student.name)
program_enrollment = get_enrollment('program', program.name, student.name)
if not program_enrollment:
frappe.throw(_("You are not enrolled in program {0}".format(program)))
return
return student.enroll_in_course(course_name=course, program_enrollment=get_enrollment('program', program, student.name))
return student.enroll_in_course(course_name=course, program_enrollment=get_enrollment('program', program.name, student.name))
else:
return frappe.get_doc('Course Enrollment', course_enrollment)

Expand Down

0 comments on commit dfc6895

Please sign in to comment.