Skip to content
Snippets Groups Projects
Commit c51c9019 authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

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
parent 94031420
No related branches found
No related tags found
No related merge requests found
Loading
@@ -508,6 +508,7 @@ class Project < ActiveRecord::Base
Loading
@@ -508,6 +508,7 @@ class Project < ActiveRecord::Base
end end
   
def external_issue_tracker def external_issue_tracker
return @external_issue_tracker if defined?(@external_issue_tracker)
@external_issue_tracker ||= @external_issue_tracker ||=
services.issue_trackers.active.without_defaults.first services.issue_trackers.active.without_defaults.first
end end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment