Merge pull request #4718 from vjFaLk/holiday-fix

Fixed issue where no Holidays would cause the report to break
This commit is contained in:
Nabin Hait
2016-02-01 15:49:15 +05:30

View File

@@ -33,7 +33,7 @@ def get_employees():
for holiday in holidays: for holiday in holidays:
holidays_list.append(holiday.holiday_date) holidays_list.append(holiday.holiday_date)
holiday_names[holiday.holiday_date] = holiday.description holiday_names[holiday.holiday_date] = holiday.description
if(holidays_list):
employee_list = frappe.db.sql("""select employee_list = frappe.db.sql("""select
employee, employee_name, att_date, status employee, employee_name, att_date, status
from tabAttendance from tabAttendance
@@ -45,3 +45,5 @@ def get_employees():
employee_data.append(holiday_names[employee_data[2]]) employee_data.append(holiday_names[employee_data[2]])
return employee_list return employee_list
else:
return None