fix: Missing "and" in filter conditions

This commit is contained in:
Faris Ansari 2019-03-28 15:42:07 +05:30
parent 6cc9831ce9
commit f04988a02f

View File

@ -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):