Skip to content
Snippets Groups Projects
Unverified Commit 3b49a794 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu :basketball:
Browse files

Prevent loading from cache if commit is nil

parent 5f11daf6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -47,6 +47,7 @@ module Gitlab
 
def load_status
return if loaded?
return unless commit
 
if has_cache?
load_from_cache
Loading
Loading
@@ -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
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment