[#345] add missing (

This commit is contained in:
Alexander Machehin 2014-03-25 23:57:40 +06:00
parent c2b9690f3f
commit b22c100327
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ class Project < ActiveRecord::Base
WHERE ptr.repository_id = ?)', repository_id)
}
scope :by_owners, ->(group_owner_ids, user_owner_ids) {
where("projects.owner_id in (?) AND projects.owner_type = 'Group') OR
where("(projects.owner_id in (?) AND projects.owner_type = 'Group') OR
(projects.owner_id in (?) AND projects.owner_type = 'User')", group_owner_ids, user_owner_ids)
}