5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 02:21:42 +00:00

Merge branch 'issue-1278' into 'rails'
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Issue 1278

See merge request sutty/sutty!190
This commit is contained in:
fauno 2023-06-09 16:14:57 +00:00
commit 885dd0ea67

View file

@ -16,12 +16,14 @@ licencias.each do |l|
licencia.update l
end
unless Rails.env.test?
YAML.safe_load(File.read('db/seeds/sites.yml')).each do |site|
site = Site.find_or_create_by name: site['name']
site.update licencia: Licencia.first, design: Design.first,
title: site.name, description: 'x' * 50,
deploys: site.deploys.empty? ? [DeployLocal.new] : site.deploys
if CodeOfConduct.count.zero?
YAML.safe_load(File.read('db/seeds/codes_of_conduct.yml')).each do |coc|
CodeOfConduct.new(**coc).save!
end
end
end
if PrivacyPolicy.count.zero?
YAML.safe_load(File.read('db/seeds/privacy_policies.yml')).each do |pp|
PrivacyPolicy.new(**pp).save!
end
end