diff options
author | Robert Speicher <robert@gitlab.com> | 2016-07-15 23:25:18 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-07-15 23:25:18 +0000 |
commit | 2d96c66d63d480f24fd023fe73bf95e67d5ad257 (patch) | |
tree | b0e9080e9f3c44c32f1d246fac9e49a610e30765 /app | |
parent | 8ab8d3e3f03083e70c814c40b91816c7d4947abf (diff) | |
parent | 979f1182ae7f036e5b647cdab6c80ca73ede968a (diff) | |
download | gitlab-ce-2d96c66d63d480f24fd023fe73bf95e67d5ad257.tar.gz |
Merge branch 'ci-pipeline-doesnt-require-project' into 'master'
Don't fail when Ci::Pipeline doesn't have a project
Fixes https://sentry.gitlap.com/gitlab/gitlabcom/issues/8870/
See merge request !5288
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/pipeline.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index fa4071e2482..7d743ce99f0 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -215,6 +215,8 @@ module Ci end def keep_around_commits + return unless project + project.repository.keep_around(self.sha) project.repository.keep_around(self.before_sha) end |