Commit 7259ee85 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add a guard clause to avoid creating empty stages

parent db3d0319
...@@ -19,6 +19,9 @@ module Gitlab ...@@ -19,6 +19,9 @@ module Gitlab
pipeline.stage_seeds.each do |seed| pipeline.stage_seeds.each do |seed|
seed.user = current_user seed.user = current_user
# TODO, this needs specs, no test coverage
next unless seed.included?
pipeline.stages << seed.to_resource pipeline.stages << seed.to_resource
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment