Fix the seeder 24_forks.rb cannot find public project

This commit is contained in:
Shinya Maeda 2018-12-26 09:40:19 +09:00
parent 5dc656fc1f
commit c735f271c8

View file

@ -4,6 +4,8 @@ Sidekiq::Testing.inline! do
Gitlab::Seeder.quiet do Gitlab::Seeder.quiet do
User.all.sample(10).each do |user| User.all.sample(10).each do |user|
source_project = Project.public_only.sample source_project = Project.public_only.sample
return unless source_project
fork_project = Projects::ForkService.new(source_project, user, namespace: user.namespace).execute fork_project = Projects::ForkService.new(source_project, user, namespace: user.namespace).execute
if fork_project.valid? if fork_project.valid?