diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-14 21:09:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-14 21:09:54 +0300 |
commit | f697dc5e76dfc5894df006d53b2b7e751653cf05 (patch) | |
tree | 1387cd225039e611f3683f96b318bb17d4c422cb /app/models/project.rb | |
parent | 874ead9c3a50de4c4ca4551eaf5b7eb976d26b50 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index ee4cc6157eb..443b44dd023 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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 |