From 826a10bdb0aae71643264777daf4c8fe70a69246 Mon Sep 17 00:00:00 2001 From: Tomas D'Stefano Date: Mon, 30 Sep 2024 11:55:47 +0100 Subject: [PATCH] Added a common used provider --- app/workers/generate_test_applications.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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,