Browse Source

seeding is now idempotent

pull/1019/head
Phil Lee 4 years ago
parent
commit
670f42d7ab
  1. 8
      db/seeds.rb

8
db/seeds.rb

@ -67,19 +67,19 @@ unless Rails.env.test?
end
end
OrganisationRelationship.create!(
OrganisationRelationship.find_or_create_by!(
child_organisation: org,
parent_organisation: housing_provider1,
)
OrganisationRelationship.create!(
OrganisationRelationship.find_or_create_by!(
child_organisation: org,
parent_organisation: housing_provider2,
)
OrganisationRelationship.create!(
OrganisationRelationship.find_or_create_by!(
child_organisation: managing_agent1,
parent_organisation: org,
)
OrganisationRelationship.create!(
OrganisationRelationship.find_or_create_by!(
child_organisation: managing_agent2,
parent_organisation: org,
)

Loading…
Cancel
Save