diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-09-20 08:50:51 +0300 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-09-20 10:53:14 +0300 |
commit | b43d3af782c52b060205e63720857bbf462d6b6e (patch) | |
tree | 8e1aec742c9d8a239ca90660111ae9fad0b94fc0 /app/models/issue.rb | |
parent | d0e101e997347b0b52d4ef3a945a0f26571546a2 (diff) |
Miscellaneous cycle-analytics-related changes.
1. Add indexes to `CreateMergeRequestsClosingIssues` columns.
2. Remove an extraneous `check_if_open` check that is redundant now.
It would've been better to rebase this in, but that's not possible
because more people are working on this branch.
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 371b3f4ee73..2403748d017 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -210,11 +210,7 @@ class Issue < ActiveRecord::Base note.all_references(current_user, extractor: ext) end - if check_if_open - ext.merge_requests.select { |mr| mr.open? && mr.closes_issue?(self) } - else - ext.merge_requests.select { |mr| mr.closes_issue?(self) } - end + ext.merge_requests.select { |mr| mr.open? && mr.closes_issue?(self) } end def moved? |