diff options
author | Stan Hu <stanhu@gmail.com> | 2016-04-07 09:07:12 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-04-07 09:19:21 +0300 |
commit | 31210cb6cb0ae723647e07ae8454cb3df22ad3ef (patch) | |
tree | d8f11a2291461f95a9a1dd0b89c44e8bedf4f16d | |
parent | 8f0945311b8f5fe30b0b57739ee9f3262499f375 (diff) |
Handle an undefined ci_id: this was keeping projects from being destroyedhandle-nil-ci-id
Closes #15005
-rw-r--r-- | app/models/ci/build.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 7d33838044b..debb7eeded7 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -285,6 +285,8 @@ module Ci # This method returns old path to artifacts only if it already exists. # def artifacts_path + return unless project + old = File.join(created_at.utc.strftime('%Y_%m'), project.ci_id.to_s, id.to_s) |