From 070d2cb855dbb91dca61dcac0fb99f8c48ac32b5 Mon Sep 17 00:00:00 2001 From: Neal Chambers Date: Fri, 25 Aug 2023 00:00:34 +0900 Subject: [PATCH] Fix stock_movements relation in variant --- app/models/spree/variant.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/spree/variant.rb b/app/models/spree/variant.rb index 0e9bbd5a1d..01c174766e 100644 --- a/app/models/spree/variant.rb +++ b/app/models/spree/variant.rb @@ -38,7 +38,7 @@ module Spree has_many :stock_items, dependent: :destroy, inverse_of: :variant has_many :stock_locations, through: :stock_items - has_many :stock_movements, dependent: :destroy + has_many :stock_movements, through: :stock_items, dependent: :destroy has_many :images, -> { order(:position) }, as: :viewable, dependent: :destroy, class_name: "Spree::Image"