From 794ac68ca68f6ec529a8fda3f7ddecff0bbf0da0 Mon Sep 17 00:00:00 2001 From: Felix Blanke <info@fblanke.de> Date: Thu, 26 Dec 2024 19:29:59 +0100 Subject: [PATCH] Use round instead of int to calc duration --- AKModel/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AKModel/models.py b/AKModel/models.py index b2528b1..ddc711f 100644 --- a/AKModel/models.py +++ b/AKModel/models.py @@ -991,7 +991,7 @@ class AKSlot(models.Model): # self.slots_in_an_hour is set in AKJSONExportView data = { "id": str(self.pk), - "duration": int(self.duration * self.slots_in_an_hour), + "duration": round(self.duration * self.slots_in_an_hour), "properties": {}, "room_constraints": [constraint.name for constraint in self.ak.requirements.all()], -- GitLab