diff options
author | Stephen Finucane <stephen@that.guru> | 2016-11-19 20:43:16 +0000 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2016-11-19 20:43:16 +0000 |
commit | 10ff10a2c73fc895d0c8067b55b5b69a4e45b8ec (patch) | |
tree | dfdb20eeeb653487dd9f5908ebe0ec388b626ea1 | |
parent | 9301db906b0937ddbc2e573fdd3d05f4a1345f63 (diff) | |
download | patchwork-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.py | 2 |
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: |