mirror of
https://github.com/frappe/lms.git
synced 2026-05-01 13:19:26 +03:00
fix: admin roles can enroll students in course/batch successfully
This commit is contained in:
@@ -32,7 +32,7 @@ class LMSBatchEnrollment(Document):
|
||||
|
||||
def validate_payment(self):
|
||||
paid_batch = frappe.db.get_value("LMS Batch", self.batch, "paid_batch")
|
||||
if paid_batch:
|
||||
if paid_batch and not self.is_admin():
|
||||
payment = frappe.db.exists(
|
||||
"LMS Payment",
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ class LMSEnrollment(Document):
|
||||
if not course_details.published and not is_admin():
|
||||
frappe.throw(_("You cannot enroll in an unpublished course."))
|
||||
|
||||
if course_details.paid_course:
|
||||
if course_details.paid_course and not is_admin():
|
||||
payment = frappe.db.exists(
|
||||
"LMS Payment",
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user