Skip to content
Snippets Groups Projects
Verified Commit a0da49ab authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Prefetch documentations in printout view.

parent 4838d759
No related branches found
No related tags found
No related merge requests found
...@@ -165,7 +165,11 @@ def full_register_group(request: HttpRequest, id_: int) -> HttpResponse: ...@@ -165,7 +165,11 @@ def full_register_group(request: HttpRequest, id_: int) -> HttpResponse:
group = get_object_or_404(Group, pk=id_) group = get_object_or_404(Group, pk=id_)
# Get all lesson periods for the selected group # Get all lesson periods for the selected group
lesson_periods = LessonPeriod.objects.filter_group(group).distinct() lesson_periods = LessonPeriod.objects.filter_group(
group
).distinct().prefetch_related(
'documentations', 'personal_notes'
)
weeks = CalendarWeek.weeks_within(group.school.current_term.date_start, group.school.current_term.date_end) weeks = CalendarWeek.weeks_within(group.school.current_term.date_start, group.school.current_term.date_end)
periods_by_day = {} periods_by_day = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment