From c49b9ba015d769be018fc38c032483b1461199f9 Mon Sep 17 00:00:00 2001 From: Kat <54268893+kosiakkatrina@users.noreply.github.com> Date: Tue, 14 Jan 2025 16:37:11 +0000 Subject: [PATCH] Add local authority links and update seed --- .../local_authorities_data/local_authority_links_2025.csv | 5 +++++ db/seeds.rb | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 config/local_authorities_data/local_authority_links_2025.csv diff --git a/config/local_authorities_data/local_authority_links_2025.csv b/config/local_authorities_data/local_authority_links_2025.csv new file mode 100644 index 000000000..be2eb290a --- /dev/null +++ b/config/local_authorities_data/local_authority_links_2025.csv @@ -0,0 +1,5 @@ +local_authority_code,linked_local_authority_code +E08000038,E08000016 +E08000039,E08000019 +E08000016,E08000038 +E08000019,E08000039 \ No newline at end of file diff --git a/db/seeds.rb b/db/seeds.rb index e0f3e6672..d3e7beb3f 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -13,9 +13,11 @@ def find_or_create_user(organisation, email, name, role) end if LocalAuthority.count.zero? - la_path = "config/local_authorities_data/initial_local_authorities.csv" - service = Imports::LocalAuthoritiesService.new(path: la_path) - service.call + paths = ["config/local_authorities_data/initial_local_authorities.csv", "config/local_authorities_data/2025_local_authorities.csv"] + paths.each do |path| + service = Imports::LocalAuthoritiesService.new(path:) + service.call + end end unless Rails.env.test?