diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2019-08-21 11:24:55 +0200 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-08-21 11:24:55 +0200 |
commit | a39228db8027c966e8117d40766b0cef4fbd50f6 (patch) | |
tree | 143045af7214ae6746e7b7c9df647c71ec2bd675 /lib/api/entities.rb | |
parent | 05f50c9b52fde54513fe55fef97499b35719eae2 (diff) | |
parent | aed489bf901745ced6618e680913d0d213998923 (diff) | |
download | gitlab-ce-docs-zm002-gitlab-case.tar.gz |
Merge branch 'master' into docs-zm002-gitlab-casedocs-zm002-gitlab-case
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 09253ab6b0e..5e66b4e76a5 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -645,7 +645,10 @@ module API end end - expose :subscribed do |issue, options| + # Calculating the value of subscribed field triggers Markdown + # processing. We can't do that for multiple issues / merge + # requests in a single API request. + expose :subscribed, if: -> (_, options) { options.fetch(:include_subscribed, true) } do |issue, options| issue.subscribed?(options[:current_user], options[:project] || issue.project) end end |