Return user only once.
This commit is contained in:
parent
ef3b018293
commit
105fca030d
1 changed files with 1 additions and 1 deletions
|
@ -432,7 +432,7 @@ returns
|
|||
end
|
||||
condition += 'roles_users.role_id IN (?)'
|
||||
}
|
||||
User.joins(:users_roles).where("(#{condition}) AND users.active = ?", *total_role_ids, true).order(:id)
|
||||
User.joins(:users_roles).where("(#{condition}) AND users.active = ?", *total_role_ids, true).distinct.order(:id)
|
||||
end
|
||||
|
||||
=begin
|
||||
|
|
Loading…
Reference in a new issue