From ae2a0fb4c7ae3704e8f37fa3820cd9511fb05bf5 Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Wed, 14 Aug 2019 16:50:31 +0530 Subject: [PATCH] chore: remove unused code --- erpnext/hr/doctype/leave_type/leave_type.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/hr/doctype/leave_type/leave_type.py b/erpnext/hr/doctype/leave_type/leave_type.py index 598bff2f13..c0d1296841 100644 --- a/erpnext/hr/doctype/leave_type/leave_type.py +++ b/erpnext/hr/doctype/leave_type/leave_type.py @@ -17,8 +17,7 @@ class LeaveType(Document): 'leave_type': self.name, 'from_date': ("<=", today()), 'to_date': (">=", today()) - }, ['name']) + }, fields=['name']) leave_allocation = [l['name'] for l in leave_allocation] - frappe.db("""select name from `tabLeave Allocation` where leave_type=%s""", (self.name)) if leave_allocation: - frappe.throw(_('Leave application is linked with leave allocations {0}. Leave application cannot be set as leave without pay').format(", ".join(leave_allocation))) #nosec \ No newline at end of file + frappe.throw(_('Leave application is linked with leave allocations {0}. Leave application cannot be set as leave without pay').format(", ".join(leave_allocation))) #nosec