From 763dab9efcb94be04e16b404c47ff75f0b82acb8 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 23 Oct 2013 10:41:50 +1100 Subject: [PATCH] Fix country init for Jenkins --- config/initializers/spree.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/initializers/spree.rb b/config/initializers/spree.rb index ad16f7ece0..584140da3e 100644 --- a/config/initializers/spree.rb +++ b/config/initializers/spree.rb @@ -17,8 +17,8 @@ Spree.config do |config| config.searcher_class = OpenFoodNetwork::Searcher # 109 should be Australia. Hardcoded for CI (Jenkins), where countries are not pre-loaded. - config.default_country_id = Spree::Country.table_exists? && Spree::Country.find_by_name('Australia').andand.id - config.default_country_id ||= 109 + config.default_country_id = Spree::Country.table_exists? && Spree::Country.find_by_name('Australia').andand.id + config.default_country_id = 109 unless config.default_country_id.present? && config.default_country_id > 0 # -- spree_paypal_express # Auto-capture payments. Without this option, payments must be manually captured in the paypal interface.