mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix Rubocop: Do not delete Spree::Variant associations
Spree::Variant acts_as_paranoid and is thus not hard deleted
This commit is contained in:
@@ -32,8 +32,8 @@ module Spree
|
||||
|
||||
delegate :name, :name=, :description, :description=, :meta_keywords, to: :product
|
||||
|
||||
has_many :inventory_units, inverse_of: :variant
|
||||
has_many :line_items, inverse_of: :variant
|
||||
has_many :inventory_units, inverse_of: :variant, dependent: nil
|
||||
has_many :line_items, inverse_of: :variant, dependent: nil
|
||||
|
||||
has_many :stock_items, dependent: :destroy, inverse_of: :variant
|
||||
has_many :stock_locations, through: :stock_items
|
||||
@@ -53,7 +53,7 @@ module Spree
|
||||
:currency, :currency=,
|
||||
to: :find_or_build_default_price
|
||||
|
||||
has_many :exchange_variants
|
||||
has_many :exchange_variants, dependent: nil
|
||||
has_many :exchanges, through: :exchange_variants
|
||||
has_many :variant_overrides, dependent: :destroy
|
||||
has_many :inventory_items, dependent: :destroy
|
||||
|
||||
Reference in New Issue
Block a user