mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 02:01:21 +00:00
fix: compare timedeltas directly
This commit is contained in:
@@ -65,9 +65,7 @@ class ServiceLevel(Document):
|
|||||||
support_days.append(support_and_resolution.workday)
|
support_days.append(support_and_resolution.workday)
|
||||||
support_and_resolution.idx = week.index(support_and_resolution.workday) + 1
|
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(),
|
if support_and_resolution.start_time >= support_and_resolution.end_time:
|
||||||
datetime.strptime(support_and_resolution.end_time, '%H:%M:%S').time())
|
|
||||||
if start_time >= end_time:
|
|
||||||
frappe.throw(_("Start Time can't be greater than or equal to End Time \
|
frappe.throw(_("Start Time can't be greater than or equal to End Time \
|
||||||
for {0}.".format(support_and_resolution.workday)))
|
for {0}.".format(support_and_resolution.workday)))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user