summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-10-05 05:07:32 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-10-05 05:07:32 +0000
commit227a93b64f582d62087ecbb19d281b9c6e5a2dcf (patch)
tree0c673df8db67fdc18e943251b5a8c4b1c8e69007 /django
parent16d0a615c49830624c026b27607e46fc329ef4f4 (diff)
Fixed #8803 -- Allow authenticated users without first_name/last_name values set to post comments.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/contrib/comments/views/comments.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/comments/views/comments.py b/django/contrib/comments/views/comments.py
index e583d9d3ed..264d5a8b13 100644
--- a/django/contrib/comments/views/comments.py
+++ b/django/contrib/comments/views/comments.py
@@ -37,7 +37,7 @@ def post_comment(request, next=None):
data = request.POST.copy()
if request.user.is_authenticated():
if not data.get('name', ''):
- data["name"] = request.user.get_full_name()
+ data["name"] = request.user.get_full_name() or request.user.username
if not data.get('email', ''):
data["email"] = request.user.email