fix: added extra condition (#19884)

This commit is contained in:
Anurag Mishra 2019-12-10 21:37:27 +05:30 committed by Nabin Hait
parent 6aa763221b
commit 9046c13858

View File

@ -351,7 +351,7 @@ class LeaveApplication(Document):
pass
def create_leave_ledger_entry(self, submit=True):
if self.status != 'Approved':
if self.status != 'Approved' and submit:
return
expiry_date = get_allocation_expiry(self.employee, self.leave_type,