This commit is contained in:
Egor Matveev 2021-11-12 01:36:25 +03:00
parent 90b2806bb0
commit 8d3399c598

View File

@ -19,7 +19,7 @@ class Progress(models.Model):
def time(self): def time(self):
if not self.finished: if not self.finished:
self.finished_time = timezone.now() self.finished_time = timezone.now()
seconds = (self.finished_time - self.start_time).total_seconds() seconds = int((self.finished_time - self.start_time).total_seconds())
hours = seconds // 3600 hours = seconds // 3600
seconds -= hours * 3600 seconds -= hours * 3600
minutes = seconds // 60 minutes = seconds // 60