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)