Merge pull request #14036 from rohitwaghchaure/hcl_leave_application_issue

[Fix] Global name 'Approved' is not defined
This commit is contained in:
rohitwaghchaure 2018-05-15 10:44:14 +05:30 committed by GitHub
commit ae41e5ffae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -351,7 +351,7 @@ def get_leave_balance_on(employee, leave_type, date, allocation_records=None,
if consider_all_leaves_in_the_allocation_period:
date = allocation.to_date
leaves_taken = get_leaves_for_period(employee, leave_type, allocation.from_date, date, status=Approved)
leaves_taken = get_leaves_for_period(employee, leave_type, allocation.from_date, date, status="Approved")
return flt(allocation.total_leaves_allocated) - flt(leaves_taken)