diff --git a/fet2020/posts/models.py b/fet2020/posts/models.py index af633026..e6bc2a13 100644 --- a/fet2020/posts/models.py +++ b/fet2020/posts/models.py @@ -193,7 +193,8 @@ class Post(models.Model): @property def author_member(self): - return (Member.all_members.get(nickname=self.author.username)) + return Member.all_members.filter(nickname=self.author.username).first() + def save(self, *args, **kwargs): "save the post with some defaults" diff --git a/fet2020/templates/posts/show.html b/fet2020/templates/posts/show.html index 2dbbfdcf..aba04016 100644 --- a/fet2020/templates/posts/show.html +++ b/fet2020/templates/posts/show.html @@ -17,13 +17,13 @@ {{post.subtitle | tags_to_url }} {% if post.author_member != None %}
- - {{post.author}} + {{post.author_member.nickname}} +
{% else %}
- FET + {{post.author}}
{% endif %}