From c10820e93e1fd98e748c227d58f4ec26b2d0b105 Mon Sep 17 00:00:00 2001 From: Shreya Shah Date: Thu, 3 May 2018 16:09:34 +0530 Subject: [PATCH] fix error (#13907) --- erpnext/hr/doctype/department_approver/department_approver.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/hr/doctype/department_approver/department_approver.py b/erpnext/hr/doctype/department_approver/department_approver.py index b65e8ffd82..d3d3a0d3a2 100644 --- a/erpnext/hr/doctype/department_approver/department_approver.py +++ b/erpnext/hr/doctype/department_approver/department_approver.py @@ -27,6 +27,8 @@ def get_approvers(doctype, txt, searchfield, start, page_len, filters): frappe.throw(_("Please select Employee Record first.")) approvers = [] + department_details = {} + department_list = [] employee_department = filters.get("department") or frappe.get_value("Employee", filters.get("employee"), "department") if employee_department: department_details = frappe.db.get_value("Department", {"name": employee_department}, ["lft", "rgt"], as_dict=True)