From 76a1283843d1ae4f9cccf521d2a7ce1cff626b55 Mon Sep 17 00:00:00 2001 From: "J.-S. Caux" <J.S.Caux@uva.nl> Date: Mon, 8 Jan 2018 13:50:13 +0100 Subject: [PATCH] Fix critical bug in Comments --- comments/templates/comments/_comment_card_content.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/comments/templates/comments/_comment_card_content.html b/comments/templates/comments/_comment_card_content.html index 73c341e09..fb7dff65a 100644 --- a/comments/templates/comments/_comment_card_content.html +++ b/comments/templates/comments/_comment_card_content.html @@ -1,8 +1,11 @@ <div class="card-body card-comment"> {% block card_block_header %}{% endblock %} <p class="card-text"> - <a href="{{comment.author.get_absolute_url}}">{{comment.author.user.first_name}} {{comment.author.user.last_name}}</a>: - + {% if comment.anonymous %} + Anonymous: + {% else %} + <a href="{{comment.author.get_absolute_url}}">{{comment.author.user.first_name}} {{comment.author.user.last_name}}</a>: + {% endif %} <a href="{{comment.get_absolute_url}}"> "{{comment.comment_text|slice:'30'}}{% if comment.comment_text|length > 30 %}...{% endif %}" </a> -- GitLab