Prevent loading from cache if commit is nil
This commit is contained in:
parent
5f11daf63c
commit
3b49a7948c
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue