From d799e8b467ac230c9a9517a4c8d6fc01f19b2360 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 22 Apr 2021 13:40:15 +0100 Subject: [PATCH] . --- anatomy/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anatomy/views.py b/anatomy/views.py index 61b4e069..d8fe5113 100644 --- a/anatomy/views.py +++ b/anatomy/views.py @@ -96,7 +96,7 @@ def question_list(request): def question_detail(request, pk): question = get_object_or_404(AnatomyQuestion, pk=pk) - if not question.open_access and not self.request.user.groups.filter(name="anatomy_checker").exists() : + if not question.open_access and not request.user.groups.filter(name="anatomy_checker").exists() : raise PermissionDenied() return render(request, "anatomy/question_detail.html", {"question": question})