chore: remove unused code

This commit is contained in:
Mangesh-Khairnar 2019-08-14 16:50:31 +05:30
parent 3a42631e65
commit ae2a0fb4c7

View File

@ -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
frappe.throw(_('Leave application is linked with leave allocations {0}. Leave application cannot be set as leave without pay').format(", ".join(leave_allocation))) #nosec