remove unnecessary uniqs
This commit is contained in:
@@ -190,12 +190,12 @@ class PostQueryBuilder
|
|||||||
end
|
end
|
||||||
|
|
||||||
if q[:commenter_id]
|
if q[:commenter_id]
|
||||||
relation = relation.where(:id => Comment.where("creator_id = ?", q[:commenter_id]).select("post_id").uniq)
|
relation = relation.where(:id => Comment.where("creator_id = ?", q[:commenter_id]).select("post_id"))
|
||||||
has_constraints!
|
has_constraints!
|
||||||
end
|
end
|
||||||
|
|
||||||
if q[:noter_id]
|
if q[:noter_id]
|
||||||
relation = relation.where(:id => Note.where("creator_id = ?", q[:noter_id]).select("post_id").uniq)
|
relation = relation.where(:id => Note.where("creator_id = ?", q[:noter_id]).select("post_id"))
|
||||||
has_constraints!
|
has_constraints!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user