Ticket #3473: comments.diff

File comments.diff, 667 bytes (added by scum, 18 years ago)

Fixes broken karma

  • contrib/comments/models.py

     
    209209class KarmaScoreManager(models.Manager):
    210210    def vote(self, user_id, comment_id, score):
    211211        try:
    212             karma = self.objects.get(comment__pk=comment_id, user__pk=user_id)
     212            karma = self.get(comment__pk=comment_id, user__pk=user_id)
    213213        except self.model.DoesNotExist:
    214214            karma = self.model(None, user_id=user_id, comment_id=comment_id, score=score, scored_date=datetime.datetime.now())
    215215            karma.save()
Back to Top