Minor Fixes: Student Enrollment

This commit is contained in:
scmmishra
2018-11-23 17:16:22 +05:30
committed by Aditya Hase
parent fdbabde80a
commit 082e3c94ef
2 changed files with 5 additions and 6 deletions

View File

@@ -100,11 +100,12 @@ def get_course_enrollment(course_name):
return None
def create_student():
student_name=frappe.session.user
user = frappe.get_doc("User", frappe.session.user)
student = frappe.get_doc({
"doctype": "Student",
"first_name": student_name,
"student_email_id": student_name,
"first_name": user.first_name,
"last_name": user.last_name,
"student_email_id": user.email,
})
student.save(ignore_permissions=True)
frappe.db.commit()