Sha256: 4b200d311665b439a6d5514073085d7e4835fee6c9b3ba9c2c64e96d97d00aee

Contents?: true

Size: 660 Bytes

Versions: 10

Compression:

Stored size: 660 Bytes

Contents

# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# !! PLEASE KEEP THIS SCRIPT IDEMPOTENT !!
#

unless Rails.env.test?
  ::Katello::OrganizationCreator.seed_all_organizations!
end

if ENV['SEED_ORGANIZATION'] && (Setting['db_pending_seed'])
  admin = User.where(:login => ENV['SEED_ADMIN_USER'].present? ? ENV['SEED_ADMIN_USER'] : 'admin').first
  if admin && admin.default_organization.nil?
    admin.default_organization = Organization.find_by(:name => ENV['SEED_ORGANIZATION'])
    admin.save!
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
katello-4.14.2 db/seeds.d/102-organizations.rb
katello-4.15.0 db/seeds.d/102-organizations.rb
katello-4.15.0.rc2 db/seeds.d/102-organizations.rb
katello-4.15.0.rc1 db/seeds.d/102-organizations.rb
katello-4.14.1 db/seeds.d/102-organizations.rb
katello-4.14.0 db/seeds.d/102-organizations.rb
katello-4.14.0.rc3 db/seeds.d/102-organizations.rb
katello-4.14.0.rc2 db/seeds.d/102-organizations.rb
katello-4.14.0.rc1.1 db/seeds.d/102-organizations.rb
katello-4.14.0.rc1 db/seeds.d/102-organizations.rb