Browse Source

seed la data before links

pull/1435/head
Kat 3 years ago
parent
commit
349dded122
  1. 6
      db/seeds.rb

6
db/seeds.rb

@ -309,6 +309,12 @@ unless Rails.env.test?
pp "Seeded 3 dummy schemes" pp "Seeded 3 dummy schemes"
end end
if LocalAuthority.count.zero?
path = "config/local_authorities_data/initial_local_authorities.csv"
service = Imports::LocalAuthoritiesService.new(path:)
service.call
end
if (Rails.env.development? || Rails.env.review?) && LocalAuthorityLink.count.zero? if (Rails.env.development? || Rails.env.review?) && LocalAuthorityLink.count.zero?
links_data_path = "config/local_authorities_data/local_authority_links_2023.csv" links_data_path = "config/local_authorities_data/local_authority_links_2023.csv"
service = Imports::LocalAuthorityLinksService.new(path: links_data_path) service = Imports::LocalAuthorityLinksService.new(path: links_data_path)

Loading…
Cancel
Save