.
This commit is contained in:
+1
-1
@@ -101,7 +101,7 @@ def question_list(request):
|
|||||||
def question_detail(request, pk):
|
def question_detail(request, pk):
|
||||||
question = get_object_or_404(AnatomyQuestion, pk=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):
|
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()
|
raise PermissionDenied()
|
||||||
|
|
||||||
return render(request, "anatomy/question_detail.html", {"question": question})
|
return render(request, "anatomy/question_detail.html", {"question": question})
|
||||||
|
|||||||
Reference in New Issue
Block a user