Sha256: 14b90ae1072dd7c5ab6ff15cd5887fbe025f6cb141f87022ea1963d8dc871cca

Contents?: true

Size: 676 Bytes

Versions: 40

Compression:

Stored size: 676 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']
  if 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
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
katello-4.13.1 db/seeds.d/102-organizations.rb
katello-4.13.0 db/seeds.d/102-organizations.rb
katello-4.12.1 db/seeds.d/102-organizations.rb
katello-4.13.0.rc1 db/seeds.d/102-organizations.rb
katello-4.12.0 db/seeds.d/102-organizations.rb
katello-4.12.0.rc3 db/seeds.d/102-organizations.rb
katello-4.12.0.rc2 db/seeds.d/102-organizations.rb
katello-4.12.0.rc1 db/seeds.d/102-organizations.rb
katello-4.11.1 db/seeds.d/102-organizations.rb
katello-4.11.0 db/seeds.d/102-organizations.rb
katello-4.11.0.rc2 db/seeds.d/102-organizations.rb
katello-4.11.0.rc1 db/seeds.d/102-organizations.rb
katello-4.10.0 db/seeds.d/102-organizations.rb
katello-4.9.2 db/seeds.d/102-organizations.rb
katello-4.10.0.rc2 db/seeds.d/102-organizations.rb
katello-4.10.0.rc1 db/seeds.d/102-organizations.rb
katello-4.8.4 db/seeds.d/102-organizations.rb
katello-4.9.1 db/seeds.d/102-organizations.rb
katello-4.8.3 db/seeds.d/102-organizations.rb
katello-4.9.0 db/seeds.d/102-organizations.rb