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
Fixed `Shipment#variants` association
Damian Legawiecdd07c0c5bf5a
diff --git a/core/app/models/spree/shipment.rb b/core/app/models/spree/shipment.rbindex ea995b8650..e22182b77a 100644--- a/core/app/models/spree/shipment.rb+++ b/core/app/models/spree/shipment.rb@@ -21,7 +21,6 @@ module Spreebelongs_to :order, class_name: 'Spree::Order', touch: trueendbelongs_to :stock_location, -> { with_deleted }, class_name: 'Spree::StockLocation'- has_many :variants, through: :inventory_unitswith_options dependent: :delete_all dohas_many :adjustments, as: :adjustable@@ -30,6 +29,7 @@ module Spreehas_many :state_changes, as: :statefulendhas_many :shipping_methods, through: :shipping_rates+ has_many :variants, through: :inventory_unitshas_one :selected_shipping_rate, -> { where(selected: true).order(:cost) }, class_name: Spree::ShippingRate.to_safter_save :update_adjustments