From 04f4d0bc866181d1b4f8bd048a15cf0015fc0194 Mon Sep 17 00:00:00 2001 From: Dominik George <dominik.george@teckids.org> Date: Mon, 11 Nov 2019 11:43:32 +0100 Subject: [PATCH] Run autopep8. --- biscuit/apps/alsijil/urls.py | 2 +- biscuit/apps/alsijil/views.py | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/biscuit/apps/alsijil/urls.py b/biscuit/apps/alsijil/urls.py index 14dad5414..e8d4c6b25 100644 --- a/biscuit/apps/alsijil/urls.py +++ b/biscuit/apps/alsijil/urls.py @@ -11,5 +11,5 @@ urlpatterns = [ path('week/<int:year>/<int:week>', views.week_view, name='week_view_by_week'), path('print/group/<int:id_>', views.full_register_group, - name='full_register_group') + name='full_register_group') ] diff --git a/biscuit/apps/alsijil/views.py b/biscuit/apps/alsijil/views.py index ce4694ff6..af7a60e62 100644 --- a/biscuit/apps/alsijil/views.py +++ b/biscuit/apps/alsijil/views.py @@ -96,12 +96,12 @@ def week_view(request: HttpRequest, year: Optional[int] = None, week: Optional[i wanted_week = CalendarWeek() lesson_periods = LessonPeriod.objects.annotate( - has_documentation=Exists(LessonDocumentation.objects.filter( - ~Q(topic__exact=''), - lesson_period=OuterRef('pk'), - week=wanted_week.week - )) - ).in_week(wanted_week) + has_documentation=Exists(LessonDocumentation.objects.filter( + ~Q(topic__exact=''), + lesson_period=OuterRef('pk'), + week=wanted_week.week + )) + ).in_week(wanted_week) group = None # FIXME workaround for #38 if request.GET.get('group', None) or request.GET.get('teacher', None) or request.GET.get('room', None): @@ -183,15 +183,15 @@ def full_register_group(request: HttpRequest, id_: int) -> HttpResponse: periods_by_day.setdefault(day, []).append((lesson_period, documentations, notes, substitution)) persons = group.members.annotate( - absences=Count('personal_notes__absent', filter=Q( - personal_notes__absent=True - )), - unexcused=Count('personal_notes__absent', filter=Q( - personal_notes__absent=True, - personal_notes__excused=False - )), - tardiness=Sum('personal_notes__late') - ) + absences=Count('personal_notes__absent', filter=Q( + personal_notes__absent=True + )), + unexcused=Count('personal_notes__absent', filter=Q( + personal_notes__absent=True, + personal_notes__excused=False + )), + tardiness=Sum('personal_notes__late') + ) context['persons'] = persons context['group'] = group -- GitLab