Commit e8d4cb74 authored by Robert May's avatar Robert May

Fix a couple of errors

parent 6929ff40
...@@ -208,14 +208,14 @@ module API ...@@ -208,14 +208,14 @@ module API
options[:cache_context] = proc do |mr| options[:cache_context] = proc do |mr|
[ [
mr.author.managed_by?(current_user), mr.author.managed_by?(current_user),
mr.assignee.managed_by?(current_user), mr.assignee&.managed_by?(current_user),
mr.assignees.map { |u| u.managed_by?(current_user) }, mr.assignees.map { |u| u.managed_by?(current_user) },
[mr.metrics&.merged_by, mr.metrics&.latest_closed_by].compact.map { |u| u.managed_by?(current_user) }, [mr.metrics&.merged_by, mr.metrics&.latest_closed_by].compact.map { |u| u.managed_by?(current_user) },
options.values_at(:render_html, :with_labels_details, :skip_merge_status_recheck) options.values_at(:render_html, :with_labels_details, :skip_merge_status_recheck)
] ]
end end
present_cached merge_requests, options present_cached merge_requests, **options
else else
present merge_requests, options present merge_requests, options
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment