[fix] timesheet datetime issue
This commit is contained in:
parent
5c3564143b
commit
0327b35b5e
@ -79,7 +79,7 @@ class Timesheet(Document):
|
||||
self.status = "Completed"
|
||||
|
||||
def set_dates(self):
|
||||
if self.docstatus < 2:
|
||||
if self.docstatus < 2 and self.time_logs:
|
||||
start_date = min([d.from_time for d in self.time_logs])
|
||||
end_date = max([d.to_time for d in self.time_logs])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user