[minor fix] change the unicode/str to the datetime obejct (#14534)

This commit is contained in:
Manas Solanki 2018-06-15 18:04:12 +05:30 committed by Nabin Hait
parent 40fe3a2cdf
commit efa191c72e

View File

@ -117,7 +117,7 @@ class LeaveApplication(Document):
frappe.db.sql("""update `tabAttendance` set status = %s, leave_type = %s\
where name = %s""",(status, self.leave_type, d.name))
elif self.to_date <= nowdate():
elif getdate(self.to_date) <= getdate(nowdate()):
for dt in daterange(getdate(self.from_date), getdate(self.to_date)):
date = dt.strftime("%Y-%m-%d")
if not date == self.half_day_date: