From f04988a02fd4c5c8f6a2c1f8756b82f042772180 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 28 Mar 2019 15:42:07 +0530 Subject: [PATCH] fix: Missing "and" in filter conditions --- erpnext/hr/doctype/leave_application/leave_application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py index b73d0e5b3f..560dd1d3bf 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.py +++ b/erpnext/hr/doctype/leave_application/leave_application.py @@ -512,7 +512,7 @@ def add_department_leaves(events, start, end, employee, company): department_employees = frappe.db.sql_list("""select name from tabEmployee where department=%s and company=%s""", (department, company)) - filter_conditions = "employee in (\"%s\")" % '", "'.join(department_employees) + filter_conditions = " and employee in (\"%s\")" % '", "'.join(department_employees) add_leaves(events, start, end, filter_conditions=filter_conditions) def add_leaves(events, start, end, filter_conditions=None):