mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: on topic page, don't try to render post counts for a deleted user
This commit is contained in:
@ -212,6 +212,7 @@ class TopicView
|
||||
|
||||
def post_counts_by_user
|
||||
@post_counts_by_user ||= Post.where(topic_id: @topic.id)
|
||||
.where("user_id IS NOT NULL")
|
||||
.group(:user_id)
|
||||
.order("count_all DESC")
|
||||
.limit(24)
|
||||
|
Reference in New Issue
Block a user