Commit 3adf35fb642fd8acfa4ecc1bd73f06ddb8fa9849
1 parent
26c8b316
Exists in
master
and in
4 other branches
pluck user_ids during team import
Showing
1 changed file
with
1 additions
and
2 deletions
Show diff stats
app/models/project_team.rb
... | ... | @@ -88,8 +88,7 @@ class ProjectTeam |
88 | 88 | target_project = project |
89 | 89 | |
90 | 90 | source_team = source_project.users_projects.to_a |
91 | - target_team = target_project.users_projects.to_a | |
92 | - target_user_ids = target_team.map(&:user_id) | |
91 | + target_user_ids = target_project.users_projects.pluck(:user_id) | |
93 | 92 | |
94 | 93 | source_team.reject! do |tm| |
95 | 94 | # Skip if user already present in team | ... | ... |