fix error format time_spent

This commit is contained in:
Leonid 2019-12-25 11:21:47 +03:00
parent 39de3ecfcc
commit 6ae7b60ef4
2 changed files with 6 additions and 6 deletions

View File

@ -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 = ""

View File

@ -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 = ""