Code

Ticket #6324: django_comments_patch.diff

File django_comments_patch.diff, 653 bytes (added by Sam Bull <sbull@…>, 6 years ago)

the patch to comments.models

Line 
1Index: contrib/comments/models.py
2===================================================================
3--- contrib/comments/models.py  (revision 6917)
4+++ contrib/comments/models.py  (working copy)
5@@ -257,7 +257,7 @@
6         if int(comment.user_id) == int(user.id):
7             return # A user can't flag his own comment. Fail silently.
8         try:
9-            f = self.objects.get(user__pk=user.id, comment__pk=comment.id)
10+            f = self.get(user__pk=user.id, comment__pk=comment.id)
11         except self.model.DoesNotExist:
12             from django.core.mail import mail_managers
13             f = self.model(None, user.id, comment.id, None)