Commit e262a281 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add a guard clause to avoid creating empty stages

parent 8b13b8c4
...@@ -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