Remove extraneous code that was previously added for performance.

This commit is contained in:
Timothy Andrew 2016-09-19 11:16:43 +05:30
parent edb38d69cc
commit b9bf23e07c
2 changed files with 2 additions and 4 deletions

View File

@ -29,8 +29,6 @@ module Issuable
end
end
has_many :system_notes, -> { merge(Note.system) }, class_name: Note, as: :noteable, inverse_of: :noteable
has_many :label_links, as: :target, dependent: :destroy
has_many :labels, through: :label_links
has_many :todos, as: :target, dependent: :destroy

View File

@ -201,8 +201,8 @@ class Issue < ActiveRecord::Base
# From all notes on this issue, we'll select the system notes about linked
# merge requests. Of those, the MRs closing `self` are returned.
def closed_by_merge_requests(current_user = nil, check_if_open: true)
return [] if !open? && check_if_open
def closed_by_merge_requests(current_user = nil)
return [] if !open?
ext = all_references(current_user)