Commit daafe5d3 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'external-issue-tracker' into 'master'

Use strong_memoize for external_issue_trackers

See merge request gitlab-org/gitlab!29276
parents d2baf7a7 326b23a2
......@@ -1190,14 +1190,14 @@ class Project < ApplicationRecord
end
def external_issue_tracker
if has_external_issue_tracker.nil? # To populate existing projects
if has_external_issue_tracker.nil?
cache_has_external_issue_tracker
end
if has_external_issue_tracker?
return @external_issue_tracker if defined?(@external_issue_tracker)
@external_issue_tracker = services.external_issue_trackers.first
strong_memoize(:external_issue_tracker) do
services.external_issue_trackers.first
end
else
nil
end
......@@ -1217,7 +1217,7 @@ class Project < ApplicationRecord
def external_wiki
if has_external_wiki.nil?
cache_has_external_wiki # Populate
cache_has_external_wiki
end
if has_external_wiki
......
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