Skip to content

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

FIX: Don't raise error when adding to cache fails in readonly mode.

Guo Xiang Tancebd8da299df
diff --git a/app/models/stylesheet_cache.rb b/app/models/stylesheet_cache.rb
index ee0b021909b..03d921c0761 100644
--- a/app/models/stylesheet_cache.rb
+++ b/app/models/stylesheet_cache.rb
@@ -34,7 +34,7 @@ class StylesheetCache < ActiveRecord::Base
end
success
- rescue ActiveRecord::RecordNotUnique
+ rescue ActiveRecord::RecordNotUnique, ActiveRecord::ReadOnlyError
false
ensure
if Rails.env.development? && old_logger