diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py index 42edc9ff13..f7fd991603 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.py +++ b/erpnext/hr/doctype/leave_application/leave_application.py @@ -193,7 +193,7 @@ class LeaveApplication(Document): def validate_max_days(self): max_days = frappe.db.get_value("Leave Type", self.leave_type, "max_days_allowed") - if max_days and self.total_leave_days > max_days: + if max_days and self.total_leave_days > cint(max_days): frappe.throw(_("Leave of type {0} cannot be longer than {1}").format(self.leave_type, max_days)) def validate_leave_approver(self):