Ticket #8803: 8803.diff

File 8803.diff, 719 bytes (added by thejaswi_puthraya, 7 years ago)

git-patch of the latest checkout

  • django/contrib/comments/views/comments.py

    diff --git a/django/contrib/comments/views/comments.py b/django/contrib/comments/views/comments.py
    index e583d9d..e5cf890 100644
    a b def post_comment(request, next=None): 
    3737    data = request.POST.copy()
    3838    if request.user.is_authenticated():
    3939        if not data.get('name', ''):
    40             data["name"] = request.user.get_full_name()
     40            if request.user.get_full_name():
     41                data["name"] = request.user.get_full_name()
     42            else:
     43                data["name"] = request.user.username
    4144        if not data.get('email', ''):
    4245            data["email"] = request.user.email
    4346
Back to Top