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

This commit is contained in:
Guo Xiang Tan 2020-07-21 12:15:28 +08:00
parent aa00a6f077
commit cebd8da299
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20
1 changed files with 1 additions and 1 deletions

View File

@ -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