mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 06:21:41 +00:00
Merge branch 'issue-1278' into 'rails'
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Issue 1278 See merge request sutty/sutty!190
This commit is contained in:
commit
885dd0ea67
1 changed files with 10 additions and 8 deletions
14
db/seeds.rb
14
db/seeds.rb
|
@ -16,12 +16,14 @@ licencias.each do |l|
|
||||||
licencia.update l
|
licencia.update l
|
||||||
end
|
end
|
||||||
|
|
||||||
unless Rails.env.test?
|
if CodeOfConduct.count.zero?
|
||||||
YAML.safe_load(File.read('db/seeds/sites.yml')).each do |site|
|
YAML.safe_load(File.read('db/seeds/codes_of_conduct.yml')).each do |coc|
|
||||||
site = Site.find_or_create_by name: site['name']
|
CodeOfConduct.new(**coc).save!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
site.update licencia: Licencia.first, design: Design.first,
|
if PrivacyPolicy.count.zero?
|
||||||
title: site.name, description: 'x' * 50,
|
YAML.safe_load(File.read('db/seeds/privacy_policies.yml')).each do |pp|
|
||||||
deploys: site.deploys.empty? ? [DeployLocal.new] : site.deploys
|
PrivacyPolicy.new(**pp).save!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue