diff options
| author | Christopher Long <indirecthit@gmail.com> | 2007-06-17 22:18:54 +0000 |
|---|---|---|
| committer | Christopher Long <indirecthit@gmail.com> | 2007-06-17 22:18:54 +0000 |
| commit | ae22b6d403dcf25098c77f0dfcf59ae58b186461 (patch) | |
| tree | c37fc631e99a7e4d909d6b6d236f495003731ea7 /django/contrib/comments/models.py | |
| parent | 0cf7bc439129c66df8d64601e885f83b256b4f25 (diff) | |
per-object-permissions: Merged to trunk [5486] NOTE: Not fully tested, will be working on this over the next few weeks.
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@5488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/comments/models.py')
| -rw-r--r-- | django/contrib/comments/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/comments/models.py b/django/contrib/comments/models.py index 90a84baaff..fa6c6aa363 100644 --- a/django/contrib/comments/models.py +++ b/django/contrib/comments/models.py @@ -209,7 +209,7 @@ class FreeComment(models.Model): class KarmaScoreManager(models.Manager): def vote(self, user_id, comment_id, score): try: - karma = self.objects.get(comment__pk=comment_id, user__pk=user_id) + karma = self.get(comment__pk=comment_id, user__pk=user_id) except self.model.DoesNotExist: karma = self.model(None, user_id=user_id, comment_id=comment_id, score=score, scored_date=datetime.datetime.now()) karma.save() |
