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

Fix displayed duration for slots

Previously, a slot duration of exactly one hour was shown as "1: 0" instead of "1:00"
parent e29f05d5
No related branches found
No related tags found
No related merge requests found
......@@ -348,7 +348,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"{int(hours)}:{int(minutes):02}"
@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