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:
authorJasper Maes <jaspermaes.jm@gmail.com>2018-10-26 19:19:28 +0300
committerJasper Maes <jaspermaes.jm@gmail.com>2018-10-26 19:19:28 +0300
commitdb80db793f43f9b4367730fc9b95c1925807f999 (patch)
tree14d832bfc698dde546b31897b56679c90be42db6 /lib/gitlab/contributions_calendar.rb
parent1815aa561ac1428cd183a8dc5c662299f9fd19e2 (diff)
Replace deprecated uniq on a Relation with distinct
Diffstat (limited to 'lib/gitlab/contributions_calendar.rb')
-rw-r--r--lib/gitlab/contributions_calendar.rb2
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)