Skip to content
Snippets Groups Projects
Commit c0344dc0 authored by Lorenzo Conti's avatar Lorenzo Conti Committed by Felix Blanke
Browse files

Apply 3 suggestion(s) to 2 file(s)

parent f2f218e1
No related branches found
No related tags found
1 merge request!268Merge fork for interoperability of KoMa solver
......@@ -414,7 +414,7 @@ class Event(models.Model):
"""
if slots_in_an_hour is None:
slots_in_an_hour = float(self.export_slot)
slots_in_an_hour = 1.0 / float(self.export_slot)
if DefaultSlot.objects.filter(event=self).exists():
# discretize default slots if they exists
......@@ -1073,7 +1073,7 @@ class AKSlot(models.Model):
data = {
"id": str(self.pk),
"duration": math.ceil(self.duration * self.event.export_slot - ceil_offet_eps),
"duration": math.ceil(self.duration / self.event.export_slot - ceil_offet_eps),
"properties": {
"conflicts":
[str(conflict.pk) for conflict in conflict_slots.all()]
......
......@@ -92,7 +92,7 @@ class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView):
context["rooms"] = rooms
timeslots = {
"info": {"duration": (1.0 / float(self.event.export_slot)), },
"info": {"duration": float(self.event.export_slot)},
"blocks": [],
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment