forked from extern/django-helpdesk
fix error format time_spent
This commit is contained in:
parent
39de3ecfcc
commit
6ae7b60ef4
@ -161,9 +161,9 @@ def format_time_spent(time_spent):
|
||||
"""
|
||||
|
||||
if time_spent:
|
||||
time_spent = "{0:02d}h:{0:02d}m".format(
|
||||
int(time_spent.total_seconds() // 3600),
|
||||
int((time_spent.total_seconds() % 3600) / 60)
|
||||
time_spent = "{0:02d}h:{1:02d}m".format(
|
||||
time_spent.seconds // 3600,
|
||||
time_spent.seconds // 60
|
||||
)
|
||||
else:
|
||||
time_spent = ""
|
||||
|
@ -35,9 +35,9 @@ from .templated_email import send_templated_mail
|
||||
|
||||
def format_time_spent(time_spent):
|
||||
if time_spent:
|
||||
time_spent = "{0:02d}h:{0:02d}m".format(
|
||||
int(time_spent.total_seconds() // (3600)),
|
||||
int((time_spent.total_seconds() % 3600) / 60)
|
||||
time_spent = "{0:02d}h:{1:02d}m".format(
|
||||
time_spent.seconds // 3600,
|
||||
time_spent.seconds // 60
|
||||
)
|
||||
else:
|
||||
time_spent = ""
|
||||
|
Loading…
Reference in New Issue
Block a user