From 10ff10a2c73fc895d0c8067b55b5b69a4e45b8ec Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Sat, 19 Nov 2016 20:43:16 +0000 Subject: [PATCH] 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 --- patchwork/views/comment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patchwork/views/comment.py b/patchwork/views/comment.py index 92e2355c..71751052 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: -- 2.47.3