diff --git a/solara/lib/core/scripts/brand_config_updater.rb b/solara/lib/core/scripts/brand_config_updater.rb index 0c9efdc..3ee5ef7 100644 --- a/solara/lib/core/scripts/brand_config_updater.rb +++ b/solara/lib/core/scripts/brand_config_updater.rb @@ -2,6 +2,10 @@ class BrandConfigUpdater def update(filename, data, brand_key) template = BrandConfigurationsManager.new(brand_key).template_with_filename(filename) + if template.nil? + Solara.logger.debug("Can't find tempate for filename: #{filename}, with brand key: #{brand_key}") + return + end path = template[:path] json = JSON.pretty_generate(data) diff --git a/solara/lib/core/scripts/brand_configurations_manager.rb b/solara/lib/core/scripts/brand_configurations_manager.rb index efb1a94..6563033 100644 --- a/solara/lib/core/scripts/brand_configurations_manager.rb +++ b/solara/lib/core/scripts/brand_configurations_manager.rb @@ -5,7 +5,7 @@ def initialize(brand_key) end def template_with_filename(filename) - templates.select { |section| section[:filename] === filename }.first + templates.select { |template| template[:filename] === filename }.first end def templates