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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Enable bypassing last store validation (#11587)
Aleksandar Petrushev3df852d248ad
diff --git a/core/app/models/spree/store.rb b/core/app/models/spree/store.rbindex 1529a37f4d..0c0685af48 100644--- a/core/app/models/spree/store.rb+++ b/core/app/models/spree/store.rb@@ -16,6 +16,8 @@ module Sprees.integer :digital_asset_link_expire_time, default: 300, null: false # 5 minutes in secondsend+ attr_accessor :skip_validate_not_last+MAILER_LOGO_CONTENT_TYPES = ['image/png', 'image/jpg', 'image/jpeg'].freezeFAVICON_CONTENT_TYPES = ['image/png', 'image/x-icon', 'image/vnd.microsoft.icon'].freeze@@ -103,7 +105,7 @@ module Spreebefore_save :ensure_default_exists_and_is_uniquebefore_save :ensure_supported_currencies, :ensure_supported_locales, :ensure_default_country- before_destroy :validate_not_last+ before_destroy :validate_not_last, unless: :skip_validate_not_lastbefore_destroy :pass_default_flag_to_other_storescope :by_url, ->(url) { where('url like ?', "%#{url}%") }