Skip to content
Snippets Groups Projects
Commit 80f50970 authored by magicfelix's avatar magicfelix
Browse files

Fix timetable list if parent groups are grades

parent 9e492da7
No related branches found
No related tags found
No related merge requests found
Pipeline #143100 failed
......@@ -104,11 +104,9 @@ def get_classes(user: "User"):
Group.objects.for_current_school_term_or_all()
.annotate(
lessons_count=Count("lesson_events"),
child_lessons_count=Count("child_groups__lesson_events"),
)
.filter(
Q(lessons_count__gt=0, parent_groups=None)
| Q(child_lessons_count__gt=0, parent_groups=None)
Q(lessons_count__gt=0)
)
.order_by("short_name", "name")
)
......
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