summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2018-03-01 20:04:15 +0100
committerTomasz Maczukin <tomasz@maczukin.pl>2018-03-28 13:57:40 +0200
commit9ef86b1b12e80bcc3a6277e2b6a36b793c828489 (patch)
treed352d6375545d26a0ce7b70ba31f259942ced239 /app/models
parent27c4cdbe288e3dba35eebdd50dbc6e103346a8c4 (diff)
downloadgitlab-ce-9ef86b1b12e80bcc3a6277e2b6a36b793c828489.tar.gz
Fix transition failure when metadata not exists
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/build.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 4b4a988d600..cc29c6150d3 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -161,7 +161,7 @@ module Ci
end
before_transition pending: :running do |build|
- build.metadata.save_timeout_state!
+ build.metadata.save_timeout_state! unless build.metadata.nil?
end
end