Commit 3b49a794 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Prevent loading from cache if commit is nil

parent 5f11daf6
......@@ -47,6 +47,7 @@ module Gitlab
def load_status
return if loaded?
return unless commit
if has_cache?
load_from_cache
......@@ -59,8 +60,6 @@ module Gitlab
end
def load_from_project
return unless commit
self.sha, self.status, self.ref = commit.sha, commit.status, project.default_branch
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment