Project

General

Profile

« Previous | Next » 

Revision 7df48f20

Added by Stephen Benjamin over 8 years ago

refs #11776 - do not set default taxonomy settings by default

This reverts commit 8809a63b93b3f79eecb33a4757c4c13d2cbf4421.

View differences:

db/seeds.d/05-taxonomies.rb
if SETTINGS[:organizations_enabled] && ENV['SEED_ORGANIZATION'] && !Organization.any?
Organization.without_auditing do
User.current = User.anonymous_admin
org = Organization.find_or_create_by_name!(:name => ENV['SEED_ORGANIZATION'])
Setting[:default_organization] = org.title if Setting[:default_organization].blank?
Organization.find_or_create_by_name!(:name => ENV['SEED_ORGANIZATION'])
User.current = nil
end
end
......
if SETTINGS[:locations_enabled] && ENV['SEED_LOCATION'] && !Location.any?
Location.without_auditing do
User.current = User.anonymous_admin
loc = Location.find_or_create_by_name!(:name => ENV['SEED_LOCATION'])
Setting[:default_location] = loc.title if Setting[:default_location].blank?
Location.find_or_create_by_name!(:name => ENV['SEED_LOCATION'])
User.current = nil
end
end

Also available in: Unified diff