Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fix DB Exception Warning

Prakash Poudel1d799ba31bd9
diff --git a/core/app/models/spree/preferences/store.rb b/core/app/models/spree/preferences/store.rb
index a9f5ee3431..af30cbd952 100644
--- a/core/app/models/spree/preferences/store.rb
+++ b/core/app/models/spree/preferences/store.rb
@@ -6,7 +6,7 @@
require 'singleton'
-DB_EXCEPTIONS = if defined? PG
+DB_EXCEPTIONS ||= if defined? PG
[PG::ConnectionBad, ActiveRecord::NoDatabaseError]
elsif defined? Mysql2
[Mysql2::Error::ConnectionError, ActiveRecord::NoDatabaseError]