Skip to content
Snippets Groups Projects
Verified Commit 521daaac authored by mirabilos's avatar mirabilos Committed by mirabilos
Browse files

It’s not as easy… it’s ManyToMany.

parent e0c8fea0
No related branches found
No related tags found
No related merge requests found
......@@ -99,7 +99,7 @@ def group_week(request: HttpRequest, week: Optional[int] = None) -> HttpResponse
periods_by_day_unsorted = {}
if group:
for act_group in [group] + list(group.child_groups.all()):
for lesson in act_group.lessons.select_related(
for lesson in act_group.lessons.prefetch_related(
'lesson_period',
'lesson_period__period',
'lesson_period__period__lesson__teachers'
......
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