From 802d43527317a95a9232948c1e92f8db8f0c3824 Mon Sep 17 00:00:00 2001 From: Hauwa Muhammad Date: Fri, 4 Oct 2024 12:07:57 +0100 Subject: [PATCH] load dummy cost centres file if S3 bucket ENV variable is not set --- config/initializers/cost_centers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/cost_centers.rb b/config/initializers/cost_centers.rb index 1338b1f..80b831e 100644 --- a/config/initializers/cost_centers.rb +++ b/config/initializers/cost_centers.rb @@ -23,7 +23,7 @@ def running_inside_a_rake_task? def get_cost_centre_data() # dont load the cost centers from s3 if were not running the server or we're not in RAILS_ENV != production - if Rails.env.development? or running_inside_a_rake_task? + if ENV['COST_CENTRE_S3_BUCKET_NAME'].blank? or running_inside_a_rake_task? return load_dummy_cost_centres() end