diff options
author | Luke Duncalfe <lduncalfe@eml.cc> | 2019-03-27 11:12:15 +1300 |
---|---|---|
committer | Luke Duncalfe <lduncalfe@eml.cc> | 2019-03-27 11:26:12 +1300 |
commit | 0cc475763eb4e7478825dd45ca2405d75a3ea5c1 (patch) | |
tree | 3e12371126903c1e0570ca77cf443e87cb65283a | |
parent | 83153e65a5249fc16c07a54b9db906a4301c76cd (diff) | |
download | gitlab-ce-7532-allow-self-approvals-even-when-not-in-approvers-list-ce.tar.gz |
Apply Memoization to MergeRequest#authors7532-allow-self-approvals-even-when-not-in-approvers-list-ce
-rw-r--r-- | app/models/merge_request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 5f6d5095bcc..b1dbe297587 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -317,7 +317,7 @@ class MergeRequest < ActiveRecord::Base end def authors - User.from_union([commit_authors, User.where(id: self.author_id)]) + @authors ||= User.from_union([commit_authors, User.where(id: self.author_id)]) end # Verifies if title has changed not taking into account WIP prefix |