From ed6aa132f37e556725fb4d2ff98330d0ab7f4c86 Mon Sep 17 00:00:00 2001 From: Sam Splunks <72095718+samsplunks@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:31:06 +0000 Subject: [PATCH] timedelta seconds property is limited to 86400 --- helpdesk/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpdesk/models.py b/helpdesk/models.py index 44575f07..a258a315 100644 --- a/helpdesk/models.py +++ b/helpdesk/models.py @@ -36,8 +36,8 @@ import uuid def format_time_spent(time_spent): if time_spent: time_spent = "{0:02d}h:{1:02d}m".format( - time_spent.seconds // 3600, - time_spent.seconds % 3600 // 60 + int(time_spent.total_seconds()) // 3600, + int(time_spent.total_seconds()) % 3600 // 60 ) else: time_spent = ""