Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2018-11-23 04:30:15 +0300
committerHeinrich Lee Yu <heinrich@gitlab.com>2018-11-26 12:41:40 +0300
commit3b49a7948c8f0613f2d04f270b70982f620d7c3a (patch)
treeb98c6a51dd083e092a596230d39a843ed723e5ec /lib/gitlab/cache
parent5f11daf63c8f99eafb40af91b92e1694b81e9b7d (diff)
Prevent loading from cache if commit is nil
Diffstat (limited to 'lib/gitlab/cache')
-rw-r--r--lib/gitlab/cache/ci/project_pipeline_status.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/gitlab/cache/ci/project_pipeline_status.rb b/lib/gitlab/cache/ci/project_pipeline_status.rb
index 195531ef94b..1bb839a274a 100644
--- a/lib/gitlab/cache/ci/project_pipeline_status.rb
+++ b/lib/gitlab/cache/ci/project_pipeline_status.rb
@@ -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