summaryrefslogtreecommitdiff
path: root/patchwork/views/patch.py
diff options
context:
space:
mode:
Diffstat (limited to 'patchwork/views/patch.py')
-rw-r--r--patchwork/views/patch.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/patchwork/views/patch.py b/patchwork/views/patch.py
index 9fdbbf9..5d772fd 100644
--- a/patchwork/views/patch.py
+++ b/patchwork/views/patch.py
@@ -15,7 +15,7 @@ from django.urls import reverse
from patchwork.forms import CreateBundleForm
from patchwork.forms import PatchForm
from patchwork.models import Bundle
-from patchwork.models import CoverLetter
+from patchwork.models import Cover
from patchwork.models import Patch
from patchwork.models import Project
from patchwork.views import generic_list
@@ -42,7 +42,7 @@ def patch_detail(request, project_id, msgid):
try:
patch = Patch.objects.get(project_id=project.id, msgid=db_msgid)
except Patch.DoesNotExist:
- covers = CoverLetter.objects.filter(
+ covers = Cover.objects.filter(
project_id=project.id,
msgid=db_msgid,
)
@@ -109,8 +109,7 @@ def patch_detail(request, project_id, msgid):
comments = patch.comments.all()
comments = comments.select_related('submitter')
- comments = comments.only('submitter', 'date', 'id', 'content',
- 'submission')
+ comments = comments.only('submitter', 'date', 'id', 'content', 'patch')
if patch.related:
related_same_project = patch.related.patches.only(