From 8d75421425acd9745318dc6fddcb21f53f465cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <git@imaniti.org> Date: Sun, 9 Jul 2023 13:45:43 +0900 Subject: [PATCH] fix auth redirect --- lectures/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/views.py b/lectures/views.py index 9aef6aa..2d3a2e2 100644 --- a/lectures/views.py +++ b/lectures/views.py @@ -142,7 +142,7 @@ def view_group_lectures(request, group_id: int): if not group_id_exists: # Doesn't exist at all raise HTTPExceptions.NOT_FOUND elif group_id_exists: # Exists without permissions checks - if request.user_is_authenticated: # The user is logged in + if request.user.is_authenticated: # The user is logged in raise HTTPExceptions.NOT_FOUND else: # The user can log in return generate_auth_redirect(request) -- GitLab