Fix stock_movements relation in variant

This commit is contained in:
Neal Chambers
2023-08-25 00:00:34 +09:00
parent 825342914d
commit 070d2cb855

View File

@@ -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"