diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-05 23:26:57 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-05 23:26:57 +0300 |
commit | 58ecb06f74f9aa6af46f7110cb5753e1f30790cd (patch) | |
tree | e571fe0e8fdfb60210ec1a1044271dbc99039293 /app/models | |
parent | 0a9cab4ee65f2b42c56989698c401cab60d68b53 (diff) |
Remove duplicates from group milestone participants list.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/group_milestone.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/group_milestone.rb b/app/models/group_milestone.rb index 33915313789..7e4f16ebf16 100644 --- a/app/models/group_milestone.rb +++ b/app/models/group_milestone.rb @@ -66,15 +66,15 @@ class GroupMilestone end def issues - @group_issues ||= milestones.map { |milestone| milestone.issues }.flatten.group_by(&:state) + @group_issues ||= milestones.map(&:issues).flatten.group_by(&:state) end def merge_requests - @group_merge_requests ||= milestones.map { |milestone| milestone.merge_requests }.flatten.group_by(&:state) + @group_merge_requests ||= milestones.map(&:merge_requests).flatten.group_by(&:state) end def participants - milestones.map { |milestone| milestone.participants.uniq }.reject(&:empty?).flatten + @group_participants ||= milestones.map(&:participants).flatten.compact.uniq end def opened_issues |