From 0fee9d61015b18192e6216770a6d255c91ae185e Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 22 Apr 2021 17:20:50 +0100 Subject: [PATCH] . --- anatomy/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/anatomy/views.py b/anatomy/views.py index 0bf800e1..15cd8560 100644 --- a/anatomy/views.py +++ b/anatomy/views.py @@ -101,8 +101,9 @@ def question_list(request): def question_detail(request, pk): question = get_object_or_404(AnatomyQuestion, pk=pk) - if not question.open_access and (not request.user.groups.filter(name="anatomy_checker").exists() and request.user not in question.author.all()): - raise PermissionDenied() + if not question.open_access + if not request.user.groups.filter(name="anatomy_checker").exists() and request.user not in question.author.all(): + raise PermissionDenied() return render(request, "anatomy/question_detail.html", {"question": question})