Skip to content

Commit

Permalink
load dummy cost centres file if S3 bucket ENV variable is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
HauwaHakimi committed Oct 4, 2024
1 parent d2f0add commit 802d435
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/cost_centers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 802d435

Please sign in to comment.