Skip to content
Snippets Groups Projects

Resolve "Next/prev functions for persons don't return the next/prev lesson"

All threads resolved!
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -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
Loading