From e0f8ac38d8d9b733e20327f413b6db804252fa63 Mon Sep 17 00:00:00 2001
From: productionserver <jorran@web564.webfaction.com>
Date: Tue, 21 Mar 2017 08:07:20 +0000
Subject: [PATCH] Fix 403 on reports found at submission detail

---
 submissions/views.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/submissions/views.py b/submissions/views.py
index 553e34467..fd8559e68 100644
--- a/submissions/views.py
+++ b/submissions/views.py
@@ -271,10 +271,7 @@ def submission_detail_wo_vn_nr(request, arxiv_identifier_wo_vn_nr):
 
 
 def submission_detail(request, arxiv_identifier_w_vn_nr):
-    submission = get_object_or_404(Submission.objects.select_related(
-                    'editor_in_charge', 'publication__in_issue__in_volume__in_journal'
-                    ).prefetch_related('authors'),
-                    arxiv_identifier_w_vn_nr=arxiv_identifier_w_vn_nr)
+    submission = get_object_or_404(Submission, arxiv_identifier_w_vn_nr=arxiv_identifier_w_vn_nr)
     try:
         is_author = request.user.contributor in submission.authors.all()
     except AttributeError:
@@ -291,7 +288,7 @@ def submission_detail(request, arxiv_identifier_w_vn_nr):
 
     form = CommentForm()
 
-    reports = submission.reports.prefetch_related('reports')
+    reports = submission.reports.all()
     try:
         author_replies = Comment.objects.filter(submission=submission,
                                                 is_author_reply=True,
-- 
GitLab