diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-03-15 13:06:50 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-03-15 13:06:50 +0300 |
commit | c51c901916c9092a97f6a11f7bc64ad25536ea19 (patch) | |
tree | e00efac034863c26cb9ef90bfc0ad96cc08993f5 /app | |
parent | 9403142083bf0ace81fc3059f2d6c5a494e48cbf (diff) |
Return the external issue tracker even if it's null
This solves the problem with caching the nil value with instance variable.
Without this the every time we ask for external_issue_tracker we built AR and potentially do SQL query
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 79e0cc7b23d..346cd6222cf 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -508,6 +508,7 @@ class Project < ActiveRecord::Base end def external_issue_tracker + return @external_issue_tracker if defined?(@external_issue_tracker) @external_issue_tracker ||= services.issue_trackers.active.without_defaults.first end |