Skip to content

Commit 581db1d

Browse files
committed
Add required seed data
1 parent 023a0bd commit 581db1d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/tasks/seeds_helper.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ def create_school(creator_id, school_id = nil)
2828
school.creator_agree_to_ux_contact = true
2929
# Country-specific required fields
3030
school.reference = format('%06d', rand(100_000..999_999)) if country_code == 'GB'
31-
school.district_nces_id = format('%012d', rand(10**12)) if country_code == 'US'
31+
if country_code == 'US'
32+
school.district_nces_id = format('%012d', rand(10**12))
33+
school.district_name = Faker::Address.community
34+
end
3235
school.school_roll_number = "#{rand(10_000..99_999)}#{('A'..'Z').to_a.sample}" if country_code == 'IE'
3336
end
3437
end

0 commit comments

Comments
 (0)