Skip to content
Snippets Groups Projects
Commit 12efa24e authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Fix formation issue in simplified duration representation of AKSlot

Also use this representation in durations list of AK
parent 1e96a1ad
No related branches found
No related tags found
No related merge requests found
......@@ -264,7 +264,7 @@ class AK(models.Model):
@property
def durations_list(self):
return ", ".join(str(slot.duration) for slot in self.akslot_set.all())
return ", ".join(str(slot.duration_simplified) for slot in self.akslot_set.all())
@property
def wish(self):
......@@ -342,7 +342,7 @@ class AKSlot(models.Model):
Display duration of slot in format hours:minutes, e.g. 1.5 -> "1:30"
"""
hours, minutes = divmod(self.duration * 60, 60)
return f"{hours}:{minutes:2.0f}"
return f"{hours}:{minutes:02.0f}"
@property
def start_simplified(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment