From b22c1003272928dae7b3cbc10757132c87dc2482 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Tue, 25 Mar 2014 23:57:40 +0600 Subject: [PATCH] [#345] add missing ( --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index 32e3ddbde..1f9f846d7 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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) }