aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2016-11-19 20:43:16 +0000
committerStephen Finucane <stephen@that.guru>2016-11-19 20:43:16 +0000
commit10ff10a2c73fc895d0c8067b55b5b69a4e45b8ec (patch)
treedfdb20eeeb653487dd9f5908ebe0ec388b626ea1
parent9301db906b0937ddbc2e573fdd3d05f4a1345f63 (diff)
downloadpatchwork-10ff10a2c73fc895d0c8067b55b5b69a4e45b8ec.tar
patchwork-10ff10a2c73fc895d0c8067b55b5b69a4e45b8ec.tar.gz
views: Don't use attr(X, 'patch')
This doesn't play nice with Django 1.6 under Python 3.4, for some odd reason. Signed-off-by: Stephen Finucane <stephen@that.guru>
-rw-r--r--patchwork/views/comment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/patchwork/views/comment.py b/patchwork/views/comment.py
index 92e2355..7175105 100644
--- a/patchwork/views/comment.py
+++ b/patchwork/views/comment.py
@@ -29,7 +29,7 @@ from patchwork import models
def comment(request, comment_id):
submission = shortcuts.get_object_or_404(models.Comment,
id=comment_id).submission
- if hasattr(submission, 'patch'):
+ if models.Patch.objects.filter(id=submission.id).exists():
url = 'patch-detail'
key = 'patch_id'
else: