Fix DemoFamilyRefreshJob demo email config lookup (#1426)

* Fix demo refresh email config lookup

Use indifferent access when reading demo config so the refresh job works whether config keys are strings or symbols. Add a regression test covering symbol-keyed config_for output.

* Remove unnecessary blank line in test file

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
Juan José Mata
2026-04-10 17:42:51 +02:00
committed by GitHub
parent dcebda05de
commit 65c5f8eb07
2 changed files with 11 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ class DemoFamilyRefreshJob < ApplicationJob
period_end = Time.current
period_start = period_end - 24.hours
demo_email = Rails.application.config_for(:demo).fetch("email")
demo_email = Rails.application.config_for(:demo).with_indifferent_access.fetch(:email)
demo_user = User.find_by(email: demo_email)
old_family = demo_user&.family