From da2b9ccf82e97700fe339083721903c975453fe4 Mon Sep 17 00:00:00 2001 From: zmagod Date: Thu, 18 Aug 2016 11:26:52 +0200 Subject: [PATCH] fixes user duplication [fixes SCI-344] --- 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 5c2dd4d33..d5981b167 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -93,7 +93,7 @@ class Project < ActiveRecord::Base .joins("INNER JOIN user_organizations ON users.id = user_organizations.user_id ") .where("user_organizations.organization_id = ?", organization) .where.not(confirmed_at: nil) - .where("users.id NOT IN (?)", UserProject.where(project: self).select(:id).distinct) + .where("users.id NOT IN (?)", UserProject.where(project: self).select(:user_id).distinct) end def user_role(user)