This commit is contained in:
Ross
2021-04-22 13:40:15 +01:00
parent e18db9c1af
commit d799e8b467
+1 -1
View File
@@ -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})