Commit 7b708c65 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'sh-fix-unnecessary-queries' into 'master'

Eliminate unnecessary queries that add ~500 ms of load time for a large issue

See merge request !10365
parents a71e777b ced1bbab
......@@ -169,6 +169,9 @@ class ProjectTeam
# Lookup only the IDs we need
user_ids = user_ids - access.keys
return access if user_ids.empty?
users_access = project.project_authorizations.
where(user: user_ids).
group(:user_id).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment