Merge pull request #9213 from manassolanki/school-report

fix for student monthly attendance report
This commit is contained in:
Makarand Bauskar 2017-06-13 12:30:37 +05:30 committed by GitHub
commit 757e1bf846

View File

@ -61,7 +61,7 @@ def get_attendance_list(from_date, to_date, student_group, students_list):
students_with_leave_application = get_students_with_leave_application(from_date, to_date, students_list) students_with_leave_application = get_students_with_leave_application(from_date, to_date, students_list)
for d in attendance_list: for d in attendance_list:
att_map.setdefault(d.student, frappe._dict()).setdefault(d.date, "") att_map.setdefault(d.student, frappe._dict()).setdefault(d.date, "")
if students_with_leave_application and d.student in students_with_leave_application.get(d.date): if students_with_leave_application.get(d.date) and d.student in students_with_leave_application.get(d.date):
att_map[d.student][d.date] = "Present" att_map[d.student][d.date] = "Present"
else: else:
att_map[d.student][d.date] = d.status att_map[d.student][d.date] = d.status