summaryrefslogtreecommitdiff
path: root/lib/ci
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2017-06-15 13:06:49 +0100
committerTiago Botelho <tiagonbotelho@hotmail.com>2017-06-28 11:32:34 +0100
commit34f57b462bc14ad194cf890a4585d403bdbde55c (patch)
tree6edd502ba8b3c0bca4e8b77492ac0936d3c52cf2 /lib/ci
parent8e8eb97861a8a93625590274af8382e9333cbf91 (diff)
downloadgitlab-ce-34f57b462bc14ad194cf890a4585d403bdbde55c.tar.gz
Fix current feature related specs
Diffstat (limited to 'lib/ci')
-rw-r--r--lib/ci/api/helpers.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ci/api/helpers.rb b/lib/ci/api/helpers.rb
index 5109dc9670f..a40b6ab6c9f 100644
--- a/lib/ci/api/helpers.rb
+++ b/lib/ci/api/helpers.rb
@@ -28,7 +28,8 @@ module Ci
yield if block_given?
- forbidden!('Project has been deleted!') unless build.project
+ project = build.project
+ forbidden!('Project has been deleted!') if project.nil? || project.pending_delete?
forbidden!('Build has been erased!') if build.erased?
end