mirror of https://github.com/django/django.git
Fixed #6324 -- Fixed `get()` call in `UserFlagManager.flag()`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
332e68d550
commit
2e43934aed
|
@ -270,7 +270,7 @@ class UserFlagManager(models.Manager):
|
||||||
if int(comment.user_id) == int(user.id):
|
if int(comment.user_id) == int(user.id):
|
||||||
return # A user can't flag his own comment. Fail silently.
|
return # A user can't flag his own comment. Fail silently.
|
||||||
try:
|
try:
|
||||||
f = self.objects.get(user__pk=user.id, comment__pk=comment.id)
|
f = self.get(user__pk=user.id, comment__pk=comment.id)
|
||||||
except self.model.DoesNotExist:
|
except self.model.DoesNotExist:
|
||||||
from django.core.mail import mail_managers
|
from django.core.mail import mail_managers
|
||||||
f = self.model(None, user.id, comment.id, None)
|
f = self.model(None, user.id, comment.id, None)
|
||||||
|
|
Loading…
Reference in New Issue