diff options
author | Robert Speicher <robert@gitlab.com> | 2018-10-29 21:35:05 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-10-29 21:35:05 +0300 |
commit | 6c5154b5bcb892864a4158e0554a0e13549a7e7c (patch) | |
tree | 7d53cca8708de8b626550adf16e1012b43575200 /lib | |
parent | 684ba98b7bae9a1d31cb1ce643d15a3add6753eb (diff) | |
parent | db80db793f43f9b4367730fc9b95c1925807f999 (diff) |
Merge branch 'rails5-deprecated-uniq' into 'master'
Replace deprecated uniq on a Relation with distinct
See merge request gitlab-org/gitlab-ce!22625
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/contributions_calendar.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/contributions_calendar.rb b/lib/gitlab/contributions_calendar.rb index c819bffdfd6..5ed6427072a 100644 --- a/lib/gitlab/contributions_calendar.rb +++ b/lib/gitlab/contributions_calendar.rb @@ -73,7 +73,7 @@ module Gitlab # re-running the contributed projects query in each union is expensive, so # use IN(project_ids...) instead. It's the intersection of two users so # the list will be (relatively) short - @contributed_project_ids ||= projects.uniq.pluck(:id) + @contributed_project_ids ||= projects.distinct.pluck(:id) authed_projects = Project.where(id: @contributed_project_ids) .with_feature_available_for_user(feature, current_user) .reorder(nil) |