From 4458eb356b6921893129eac094c2fbd2598e652e Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Fri, 9 Jun 2017 18:20:21 +0530 Subject: [PATCH] fix for student monthly attendance report --- .../student_monthly_attendance_sheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py b/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py index 91f6c364cb..1e79a93282 100644 --- a/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py +++ b/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py @@ -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) for d in attendance_list: 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" else: att_map[d.student][d.date] = d.status