diff --git a/app/controllers/admin/enterprise_groups_controller.rb b/app/controllers/admin/enterprise_groups_controller.rb index 7759f57c12..32280b7fa3 100644 --- a/app/controllers/admin/enterprise_groups_controller.rb +++ b/app/controllers/admin/enterprise_groups_controller.rb @@ -27,7 +27,7 @@ module Admin def build_resource_with_address enterprise_group = build_resource_without_address enterprise_group.address = Spree::Address.new - enterprise_group.address.country = Spree::Country.find_by_name(ENV['DEFAULT_COUNTRY']) + enterprise_group.address.country = Spree::Country.find_by_id(Spree::Config[:default_country_id]) enterprise_group end alias_method_chain :build_resource, :address