mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-02 21:51:51 +08:00
Merge pull request #73 from ZmagoD/zd_SCI_344
fixes user duplication [fixes SCI-344]
This commit is contained in:
commit
58930f3456
1 changed files with 5 additions and 4 deletions
|
@ -90,10 +90,11 @@ class Project < ActiveRecord::Base
|
|||
|
||||
def unassigned_users
|
||||
User
|
||||
.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)
|
||||
.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(:user_id).distinct)
|
||||
end
|
||||
|
||||
def user_role(user)
|
||||
|
|
Loading…
Reference in a new issue