From acecc41ec8142552b417b2c61698efed477b108a Mon Sep 17 00:00:00 2001 From: Sam Splunks <72095718+samsplunks@users.noreply.github.com> Date: Wed, 27 Mar 2024 15:59:25 +0000 Subject: [PATCH] Using MIDNIGHT constant instead of number --- helpdesk/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpdesk/lib.py b/helpdesk/lib.py index bd8c4a42..96bb430f 100644 --- a/helpdesk/lib.py +++ b/helpdesk/lib.py @@ -220,7 +220,7 @@ def daily_time_spent_calculation(earliest, latest, open_hours): latest_f = latest.hour + latest.minute / 60 + latest.second / (60 * 60) + latest.microsecond / (60 * 60 * 999999) # if latest time is midnight and close hour is midnight, add a second to the time spent - if latest_f >= 24 and end == MIDNIGHT: + if latest_f >= MIDNIGHT and end == MIDNIGHT: time_spent_seconds += 1 if earliest_f < start: