summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-11-15 19:24:05 +0900
committerShinya Maeda <shinya@gitlab.com>2018-11-15 19:24:05 +0900
commit00842f951487db27e6b599c8f11b17e0cd1bd35c (patch)
tree1d6d1f76eb8f0fd53e152efc81f70f06ef1b6f2e
parenta2a2a8f0b6aef6064cd0a7c9bc96786b7354a626 (diff)
downloadgitlab-ce-ignore-environment-validation-failure.tar.gz
-rw-r--r--app/models/concerns/deployable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/deployable.rb b/app/models/concerns/deployable.rb
index 773a104f27c..bc12b06b5af 100644
--- a/app/models/concerns/deployable.rb
+++ b/app/models/concerns/deployable.rb
@@ -15,7 +15,7 @@ module Deployable
# If we failed to persist envirionment record by validation error, such as name with invalid character,
# the job will fall back to a non-environment job.
- return if environment.errors.any?
+ return unless environment.persisted?
create_deployment!(
project_id: environment.project_id,