Skip to content
Snippets Groups Projects
Commit bf157dc3 authored by Felix Blanke's avatar Felix Blanke
Browse files

Fix kwarg usage

parent 744b0e76
No related branches found
No related tags found
1 merge request!7Encapsulate discretization in Event::discretize_timeslots
Pipeline #269131 passed
......@@ -385,9 +385,9 @@ class Event(models.Model):
def discretize_timeslots(self, *, slots_in_an_hour: float = 1.0) -> Iterable[TimeslotBlock]:
if DefaultSlot.objects.filter(event=self).exists():
# discretize default slots if they exists
yield from merge_blocks(self.default_time_slots(slots_in_an_hour=SLOTS_IN_AN_HOUR))
yield from merge_blocks(self.default_time_slots(slots_in_an_hour=slots_in_an_hour))
else:
yield from self.uniform_time_slots(slots_in_an_hour=SLOTS_IN_AN_HOUR)
yield from self.uniform_time_slots(slots_in_an_hour=slots_in_an_hour)
def schedule_from_json(self, schedule: str) -> None:
"""Load AK schedule from a json string.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment