mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Adapt query in product destroy process to rails 4
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user