mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
Merge pull request #20564 from govindsmenokee/patch-4
fix: get_students not respecting the program
This commit is contained in:
@@ -123,9 +123,11 @@ def get_students(student_group, academic_year, academic_term=None, student_categ
|
|||||||
|
|
||||||
students = frappe.db.sql("""
|
students = frappe.db.sql("""
|
||||||
select pe.student, pe.student_name, pe.program, pe.student_batch_name
|
select pe.student, pe.student_name, pe.program, pe.student_batch_name
|
||||||
from `tabStudent Group Student` sgs, `tabProgram Enrollment` pe
|
from `tabStudent Group Student` sgs, `tabProgram Enrollment` pe, `tabStudent Group` sg
|
||||||
where
|
where
|
||||||
pe.student = sgs.student and pe.academic_year = %s
|
pe.student = sgs.student and pe.academic_year = %s
|
||||||
|
and sg.program = pe.program
|
||||||
|
and sg.name = sgs.parent
|
||||||
and sgs.parent = %s and sgs.active = 1
|
and sgs.parent = %s and sgs.active = 1
|
||||||
{conditions}
|
{conditions}
|
||||||
""".format(conditions=conditions), (academic_year, student_group), as_dict=1)
|
""".format(conditions=conditions), (academic_year, student_group), as_dict=1)
|
||||||
|
|||||||
Reference in New Issue
Block a user