Adapt query in product destroy process to rails 4

This commit is contained in:
luisramos0
2019-04-07 00:28:04 +01:00
parent e9667ab289
commit 07a6e62d09

View File

@@ -189,7 +189,7 @@ Spree::Product.class_eval do
OpenFoodNetwork::ProductsCache.product_deleted(self) do
touch_distributors
ExchangeVariant.where('exchange_variants.variant_id IN (?)', variants_including_master.with_deleted).destroy_all
ExchangeVariant.where('exchange_variants.variant_id IN (?)', variants_including_master.with_deleted.select(:id)).destroy_all
destroy_without_delete_from_order_cycles
end