diff --git a/aleksis/apps/chronos/model_extensions.py b/aleksis/apps/chronos/model_extensions.py index c95fc7b093948ae71d23438c33a982e23c6ce43e..9bdf9fa8d9f183898873e5b22dc61722dcfd53d8 100644 --- a/aleksis/apps/chronos/model_extensions.py +++ b/aleksis/apps/chronos/model_extensions.py @@ -83,7 +83,7 @@ def lesson_periods_as_teacher(self): @Person.method def lessons_on_day(self, day: date): """Get all lessons of this person (either as participant or teacher) on the given day.""" - return LessonPeriod.objects.order_by("period__period").on_day(day).filter_from_person(self) + return LessonPeriod.objects.on_day(day).filter_from_person(self).order_by("period__period") @Person.method