From 972277ebcd18cbe9eb3cad06311827f96432e4c0 Mon Sep 17 00:00:00 2001 From: "Andreas (@xAndy) Zimmermann" Date: Thu, 21 Apr 2022 00:53:21 +0200 Subject: [PATCH] black --- shiftregister/app/views.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/shiftregister/app/views.py b/shiftregister/app/views.py index 601681f..8382e17 100644 --- a/shiftregister/app/views.py +++ b/shiftregister/app/views.py @@ -17,9 +17,12 @@ def index(request): # currently only sorts by date context = {} if request.helper: - context["my_shifts"] = (reg.shift for reg in request.helper.shiftregistration_set.filter( - shift__start_at__gt=timezone.now() - ).order_by("shift__start_at")) + context["my_shifts"] = ( + reg.shift + for reg in request.helper.shiftregistration_set.filter( + shift__start_at__gt=timezone.now() + ).order_by("shift__start_at") + ) imp_shift = request.helper.important_shift() print(imp_shift)