few small fixes

This commit is contained in:
Ross
2024-02-07 14:04:42 +00:00
parent b1da429036
commit 9ff395325f
3 changed files with 9 additions and 4 deletions
+4 -2
View File
@@ -338,13 +338,15 @@ def finding_detail(request, pk):
@login_required
@user_is_author_or_atlas_editor
def author_detail(request, pk):
# logging.debug(Author.objects.all())
# author = get_object_or_404(Author, pk=pk)
author = User.objects.get(pk=pk)
atlas = Case.objects.filter(author=pk)
if request.user.pk == pk:
atlas = Case.objects.filter(author=pk)
else:
atlas = Case.objects.filter(author=pk, open_access=True)
return render(
request, "atlas/category_detail.html", {"category": author, "atlas": atlas}