From 92c7db2249514e1e55df65ff0b1fa3ebb0f42895 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Sat, 20 Oct 2018 23:43:33 +0100 Subject: [PATCH] Adapt product_decorator code to spree 2 where variants_including_master now makes use of Paranoi gem --- app/models/spree/product_decorator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/spree/product_decorator.rb b/app/models/spree/product_decorator.rb index d5ccd13dc7..8c0571558a 100644 --- a/app/models/spree/product_decorator.rb +++ b/app/models/spree/product_decorator.rb @@ -215,7 +215,7 @@ Spree::Product.class_eval do self.supplier.touch touch_distributors - ExchangeVariant.where('exchange_variants.variant_id IN (?)', self.variants_including_master_and_deleted).destroy_all + ExchangeVariant.where('exchange_variants.variant_id IN (?)', self.variants_including_master.with_deleted).destroy_all delete_without_delete_from_order_cycles end