Skip to content
Snippets Groups Projects
Commit 77dd5811 authored by Nadja Geisler's avatar Nadja Geisler :sunny:
Browse files

Merge branch 'fix-duration-display' into 'main'

Fix displayed duration for slots

See merge request kif/akplanning!97
parents e29f05d5 e609497c
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