fix: compare timedeltas directly
This commit is contained in:
parent
1bfef6a600
commit
fc3232a9db
@ -65,9 +65,7 @@ class ServiceLevel(Document):
|
||||
support_days.append(support_and_resolution.workday)
|
||||
support_and_resolution.idx = week.index(support_and_resolution.workday) + 1
|
||||
|
||||
start_time, end_time = (datetime.strptime(support_and_resolution.start_time, '%H:%M:%S').time(),
|
||||
datetime.strptime(support_and_resolution.end_time, '%H:%M:%S').time())
|
||||
if start_time >= end_time:
|
||||
if support_and_resolution.start_time >= support_and_resolution.end_time:
|
||||
frappe.throw(_("Start Time can't be greater than or equal to End Time \
|
||||
for {0}.".format(support_and_resolution.workday)))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user