From 9afc4edcb5f67dc749ab573576f16105b128b1a2 Mon Sep 17 00:00:00 2001 From: David Wilkie Date: Tue, 3 Sep 2024 22:23:55 +0700 Subject: [PATCH] Fix Yaml loading --- components/services/config/app_settings.yml | 2 +- components/services/config/initializers/somleng_regions.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/services/config/app_settings.yml b/components/services/config/app_settings.yml index ce4fea676..cd613d04e 100644 --- a/components/services/config/app_settings.yml +++ b/components/services/config/app_settings.yml @@ -1,5 +1,5 @@ default: &default - region_data: "<%= ENV.fetch('REGION_DATA', '{}') %>" + region_data: '<%= ENV.fetch("REGION_DATA", "{}") %>' stub_regions: false production: &production diff --git a/components/services/config/initializers/somleng_regions.rb b/components/services/config/initializers/somleng_regions.rb index b92ecd066..2d11fd587 100644 --- a/components/services/config/initializers/somleng_regions.rb +++ b/components/services/config/initializers/somleng_regions.rb @@ -1,6 +1,6 @@ require "json" SomlengRegions.configure do |config| - config.region_data = JSON.parse(AppSettings.fetch(:region_data)) + config.region_data = AppSettings.fetch(:region_data) config.stub_regions = AppSettings.fetch(:stub_regions) end