mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 22:08:01 +08:00
FIX: Do not use cached settings during theme compilation
We compile within a database transaction, so using a cached value from redis can cause unwanted side effects
This commit is contained in:
@ -119,7 +119,8 @@ class ThemeField < ActiveRecord::Base
|
||||
js_compiler.append_js_error(error)
|
||||
end
|
||||
|
||||
js_compiler.prepend_settings(theme.cached_settings) if js_compiler.content.present? && theme.cached_settings.present?
|
||||
settings_hash = theme.build_settings_hash
|
||||
js_compiler.prepend_settings(settings_hash) if js_compiler.content.present? && settings_hash.present?
|
||||
javascript_cache.content = js_compiler.content
|
||||
javascript_cache.save!
|
||||
|
||||
|
Reference in New Issue
Block a user