diff --git a/lib/flag_query.rb b/lib/flag_query.rb index 91deb31dc59..f8051853c60 100644 --- a/lib/flag_query.rb +++ b/lib/flag_query.rb @@ -163,6 +163,8 @@ module FlagQuery .flags .active .includes(post: [:user, :topic]) + .references(:post) + .where("posts.user_id > 0") .order('post_actions.created_at DESC') ft_by_id = {}