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 promotions cache when updating actions calculator (#13160)

brozekcb7e3496d224
diff --git a/core/app/models/spree/calculator.rb b/core/app/models/spree/calculator.rb
index 5153de05dd..b648760c28 100644
--- a/core/app/models/spree/calculator.rb
+++ b/core/app/models/spree/calculator.rb
@@ -2,7 +2,7 @@ module Spree
class Calculator < Spree.base_class
acts_as_paranoid
- belongs_to :calculable, polymorphic: true, optional: true, inverse_of: :calculator
+ belongs_to :calculable, polymorphic: true, optional: true, inverse_of: :calculator, touch: true
# This method calls a compute_<computable> method. must be overridden in concrete calculator.
#