fix: JobCard TimeLog to_date (#29872) (#29919)

(cherry picked from commit e4c4dc402e)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
This commit is contained in:
mergify[bot]
2022-02-21 20:17:05 +05:30
committed by GitHub
parent 9adbaaea4a
commit 6b87d38a80

View File

@@ -62,7 +62,7 @@ class JobCard(Document):
if self.get('time_logs'):
for d in self.get('time_logs'):
if get_datetime(d.from_time) > get_datetime(d.to_time):
if d.to_time and get_datetime(d.from_time) > get_datetime(d.to_time):
frappe.throw(_("Row {0}: From time must be less than to time").format(d.idx))
data = self.get_overlap_for(d)