Merge pull request #17038 from netchampfaris/fix-leave-application-condition

fix: Missing "and" in filter conditions
This commit is contained in:
Nabin Hait 2019-04-01 11:15:36 +05:30 committed by GitHub
commit 4873875c1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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