From 21c5270a39022d447b63aa0ceb527863e67804fd Mon Sep 17 00:00:00 2001 From: Bob Van Landuyt Date: Tue, 14 Mar 2017 20:46:34 +0100 Subject: Don't try to load status when there is no commit This could happen when the repository is missing. In which case cache needs to be cleared --- app/models/ci/pipeline_status.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/models') diff --git a/app/models/ci/pipeline_status.rb b/app/models/ci/pipeline_status.rb index c41c43868f9..048047d0e34 100644 --- a/app/models/ci/pipeline_status.rb +++ b/app/models/ci/pipeline_status.rb @@ -37,6 +37,8 @@ module Ci end def load_from_commit + return unless commit + self.sha = commit.sha self.status = commit.status end -- cgit v1.2.1