diff options
author | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-10-26 18:19:28 +0200 |
---|---|---|
committer | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-10-26 18:19:28 +0200 |
commit | db80db793f43f9b4367730fc9b95c1925807f999 (patch) | |
tree | 14d832bfc698dde546b31897b56679c90be42db6 /lib | |
parent | 1815aa561ac1428cd183a8dc5c662299f9fd19e2 (diff) | |
download | gitlab-ce-db80db793f43f9b4367730fc9b95c1925807f999.tar.gz |
Replace deprecated uniq on a Relation with distinct
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) |