Skip to content

A platform for community discussion. Free, open, simple.

FIX: Clear in-process theme cache after clearing DB cache (#11517)

David Taylorc54217f33d37
diff --git a/app/models/theme_translation_override.rb b/app/models/theme_translation_override.rb
index 93ba1f2bca9..ec639c2731f 100644
--- a/app/models/theme_translation_override.rb
+++ b/app/models/theme_translation_override.rb
@@ -4,9 +4,9 @@ class ThemeTranslationOverride < ActiveRecord::Base
belongs_to :theme
after_commit do
+ theme.theme_fields.where(target_id: Theme.targets[:translations]).update_all(value_baked: nil)
theme.clear_cached_settings!
theme.remove_from_cache!
- theme.theme_fields.where(target_id: Theme.targets[:translations]).update_all(value_baked: nil)
end
end