fix: duplicate enrollment validation on update

This commit is contained in:
raizasafeel
2026-02-20 12:09:08 +05:30
parent 0ff14a959d
commit 0e90627144

View File

@@ -30,7 +30,7 @@ class LMSEnrollment(Document):
},
)
if existing_enrollment:
if existing_enrollment and existing_enrollment != self.name:
frappe.throw(_("Student is already enrolled in this course."))
def validate_course_enrollment_eligibility(self):