forked from extern/django-helpdesk
Merge pull request #791 from stilet/bugfix_time_spent
fix error format time_spent
This commit is contained in:
commit
65943e8623
@ -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