From cebd8da299dfd9cd712d0234a0cf324f9777dbf0 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Tue, 21 Jul 2020 12:15:28 +0800 Subject: [PATCH] FIX: Don't raise error when adding to cache fails in readonly mode. --- app/models/stylesheet_cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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