From a192287431771adaee0eb7e712bfaedb6267b62c Mon Sep 17 00:00:00 2001 From: ToksT Date: Sat, 30 Mar 2013 09:32:53 -0300 Subject: [PATCH] revert --- app/logical/post_query_builder.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/logical/post_query_builder.rb b/app/logical/post_query_builder.rb index 0984763fd..dd5a2f350 100644 --- a/app/logical/post_query_builder.rb +++ b/app/logical/post_query_builder.rb @@ -190,12 +190,12 @@ class PostQueryBuilder end if q[:commenter_id] - relation = relation.where(:id => Comment.where("creator_id = ?", q[:commenter_id]).select("post_id")) + relation = relation.where(:id => Comment.where("creator_id = ?", q[:commenter_id]).select("post_id").uniq) has_constraints! end if q[:noter_id] - relation = relation.where(:id => Note.where("creator_id = ?", q[:noter_id]).select("post_id")) + relation = relation.where(:id => Note.where("creator_id = ?", q[:noter_id]).select("post_id").uniq) has_constraints! end