diff --git a/app/workers/generate_test_applications.rb b/app/workers/generate_test_applications.rb index e89c404d534..dff75226a24 100644 --- a/app/workers/generate_test_applications.rb +++ b/app/workers/generate_test_applications.rb @@ -167,7 +167,10 @@ def undergraduate_courses_from_cycle(year) .in_cycle(recruitment_cycle_year) if courses.count.zero? - provider = Provider.all.sample(10).sample || FactoryBot.create(:provider) + common_used_provider_code = '1TZ' + provider = Provider.find_by(code: common_used_provider_code) || + Provider.all.sample(10).sample || + FactoryBot.create(:provider) FactoryBot.create_list( :course,