From 81f2b38b787d113ad31e07fc8a47fd2c273c53e6 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 25 Sep 2017 16:15:48 -0400 Subject: [PATCH] FIX: Don't include flags on non-human users --- lib/flag_query.rb | 2 ++ 1 file changed, 2 insertions(+) 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 = {}