mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 05:01: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
16
db/seeds.rb
16
db/seeds.rb
|
@ -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
|
||||
|
||||
if PrivacyPolicy.count.zero?
|
||||
YAML.safe_load(File.read('db/seeds/privacy_policies.yml')).each do |pp|
|
||||
PrivacyPolicy.new(**pp).save!
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue