fix: skip application fetch for non allocation records

This commit is contained in:
Mangesh-Khairnar
2019-05-12 22:45:14 +05:30
parent 783bd89413
commit cf8f4bda8f

View File

@@ -34,6 +34,9 @@ def delete_ledger_entry(ledger):
{'transaction_name': ledger.transaction_name}, {'transaction_name': ledger.transaction_name},
['name', 'creation'] ['name', 'creation']
) )
leave_application_records = []
if ledger.transaction_type == "Leave Allocation":
leave_application_records = frappe.get_all("Leave Ledger Entry", leave_application_records = frappe.get_all("Leave Ledger Entry",
filters={ filters={
'transaction_type': 'Leave Application', 'transaction_type': 'Leave Application',