From 86bab028a4bbf4d34232885c9d55fc14f57536cb Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Fri, 28 Sep 2018 14:16:50 +0200 Subject: [PATCH] Fixed bug: Setting change_id is always nil after re-initializing of app in test env and prevents (re-)loading of Settings. --- app/models/setting.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/setting.rb b/app/models/setting.rb index d08c84a48..cf06b283e 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -150,7 +150,7 @@ reload config settings return true end change_id = Cache.get('Setting::ChangeId') - if change_id == @@change_id + if @@change_id && change_id == @@change_id @@lookup_at = Time.zone.now # rubocop:disable Style/ClassVars #logger.debug "Setting.cache_valid?: cache still valid, #{@@change_id}/#{change_id}" return true