Fixed #3473 -- Corrected access to get in manager (probably introduced as part of magic-removal conversion).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4873 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
df119b7786
commit
7be1f44053
|
@ -209,7 +209,7 @@ class FreeComment(models.Model):
|
||||||
class KarmaScoreManager(models.Manager):
|
class KarmaScoreManager(models.Manager):
|
||||||
def vote(self, user_id, comment_id, score):
|
def vote(self, user_id, comment_id, score):
|
||||||
try:
|
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:
|
except self.model.DoesNotExist:
|
||||||
karma = self.model(None, user_id=user_id, comment_id=comment_id, score=score, scored_date=datetime.datetime.now())
|
karma = self.model(None, user_id=user_id, comment_id=comment_id, score=score, scored_date=datetime.datetime.now())
|
||||||
karma.save()
|
karma.save()
|
||||||
|
|
Loading…
Reference in New Issue