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
Fix Calculator to allow for one Calculator to be a subclass of another. (#11661)
Jan Berdajs0cccdc7283e6
diff --git a/core/app/models/concerns/spree/calculated_adjustments.rb b/core/app/models/concerns/spree/calculated_adjustments.rbindex 3c24b9a179..04aacb9ca2 100644--- a/core/app/models/concerns/spree/calculated_adjustments.rb+++ b/core/app/models/concerns/spree/calculated_adjustments.rb@@ -18,7 +18,7 @@ module Spreedef calculator_type=(calculator_type)klass = calculator_type.constantize if calculator_type- self.calculator = klass.new if klass && !calculator.is_a?(klass)+ self.calculator = klass.new if klass && !calculator.instance_of?(klass)endprivate