Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 00:10:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 00:10:16 +0300
commit039b920db38c464de624710acec581be5a0eb961 (patch)
tree77eb43daaa9b25b6f8673433faf2e809992474a6 /app/presenters/projects
parent042cd704b8177e7997af4a2ca90967d3178ccc3f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters/projects')
-rw-r--r--app/presenters/projects/import_export/project_export_presenter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/presenters/projects/import_export/project_export_presenter.rb b/app/presenters/projects/import_export/project_export_presenter.rb
index b52f3411c49..611294ddfd8 100644
--- a/app/presenters/projects/import_export/project_export_presenter.rb
+++ b/app/presenters/projects/import_export/project_export_presenter.rb
@@ -31,11 +31,11 @@ module Projects
def group_members
return [] unless current_user.can?(:admin_group, project.group)
- # We need `.where.not(user_id: nil)` here otherwise when a group has an
+ # We need `.connected_to_user` here otherwise when a group has an
# invitee, it would make the following query return 0 rows since a NULL
# user_id would be present in the subquery
# See http://stackoverflow.com/questions/129077/not-in-clause-and-null-values
- non_null_user_ids = project.project_members.where.not(user_id: nil).select(:user_id)
+ non_null_user_ids = project.project_members.connected_to_user.select(:user_id)
GroupMembersFinder.new(project.group).execute.where.not(user_id: non_null_user_ids)
end
# rubocop: enable CodeReuse/ActiveRecord