diff --git a/erpnext/schools/doctype/program_enrollment/program_enrollment.py b/erpnext/schools/doctype/program_enrollment/program_enrollment.py index 32cfe6b2b3..4e679082c6 100644 --- a/erpnext/schools/doctype/program_enrollment/program_enrollment.py +++ b/erpnext/schools/doctype/program_enrollment/program_enrollment.py @@ -94,8 +94,8 @@ def get_students(doctype, txt, searchfield, start, page_len, filters): students = [d.student for d in enrolled_students] if enrolled_students else [""] - return frappe.db.sql("""select - name, title from tabStudent + return frappe.db.sql("""select + name, title from tabStudent where name not in (%s) and