mirror of
https://github.com/we-promise/sure
synced 2026-04-25 17:15:07 +02:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user