summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-07-18 03:26:41 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-07-18 03:26:41 +0800
commit042cf15b6f6dae6a6e3f760f93a3ad0f7ff486ea (patch)
tree05a60edfa9a708f83c1e4eb640961c404c065ad2 /app
parent4d03873cd105507195c58c94a02a18e0f086173a (diff)
downloadgitlab-ce-042cf15b6f6dae6a6e3f760f93a3ad0f7ff486ea.tar.gz
Cache Note#notable for commits and fix testsrequest-store-wrap
Diffstat (limited to 'app')
-rw-r--r--app/models/note.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 3d39047d32f..d0e3bc0bfed 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -190,7 +190,7 @@ class Note < ActiveRecord::Base
# override to return commits, which are not active record
def noteable
if for_commit?
- project.commit(commit_id)
+ @commit ||= project.commit(commit_id)
else
super
end