fix: commit leave_allocation change to db (#25382)

This commit is contained in:
Ankush Menat 2021-04-19 11:51:46 +05:30 committed by GitHub
parent 9c9907cf8e
commit 6c88ab07c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,7 @@ class CompensatoryLeaveRequest(Document):
else:
leave_allocation = self.create_leave_allocation(leave_period, date_difference)
self.leave_allocation=leave_allocation.name
self.db_set("leave_allocation", leave_allocation.name)
else:
frappe.throw(_("There is no leave period in between {0} and {1}").format(format_date(self.work_from_date), format_date(self.work_end_date)))
@ -124,4 +124,4 @@ class CompensatoryLeaveRequest(Document):
))
allocation.insert(ignore_permissions=True)
allocation.submit()
return allocation
return allocation