most recent poster fix

This commit is contained in:
Dominic DiTaranto 2025-11-18 13:50:25 -05:00
parent e638513fdb
commit d507143f89
2 changed files with 3 additions and 3 deletions

View file

@ -7,7 +7,7 @@
<title>Christians of the Internet</title>
<link rel="shortcut icon"
type="image/png"
href="{% static 'img/favicon.ico' %}" />
href="https://members.christian-webring.org/static/img/favicon.ico" />
{% block head %}{% endblock %}
</head>
<body>

View file

@ -190,8 +190,8 @@ def forum_threads(request):
'title': forum_subcategory.title,
'description': forum_subcategory.description,
'post_count': len(forum_subcategory.posts.all()),
'most_recent_poster': forum_subcategory.posts.first().created_by if forum_subcategory.posts.first() else 'admin',
'most_recent_post_date': forum_subcategory.posts.first().created_at if forum_subcategory.posts.first() else forum_subcategory.created_at,
'most_recent_poster': forum_subcategory.posts.last().created_by if forum_subcategory.posts.last() else 'admin',
'most_recent_post_date': forum_subcategory.posts.last().created_at if forum_subcategory.posts.last() else forum_subcategory.created_at,
}
parsed_forum_threads[forum_subcategory.forum_category.title].append(data)