From 707876820a8e6292128c7ef001fdccc94c04abc8 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Mon, 29 Mar 2021 17:31:10 +0100 Subject: [PATCH] Fix showing soft-deleted products in producer mailer The test at `spec/mailers/producer_mailer_spec.rb:115` was failing but we missed it before, as the CI was not reporting failures in some jobs. --- app/mailers/producer_mailer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mailers/producer_mailer.rb b/app/mailers/producer_mailer.rb index 648fa7c69d..f135e16dfd 100644 --- a/app/mailers/producer_mailer.rb +++ b/app/mailers/producer_mailer.rb @@ -63,7 +63,7 @@ class ProducerMailer < Spree::BaseMailer includes(:option_values, variant: [:product, { option_values: :option_type }]). from_order_cycle(order_cycle). sorted_by_name_and_unit_value. - merge(Spree::Product.in_supplier(producer)). + merge(Spree::Product.with_deleted.in_supplier(producer)). merge(Spree::Order.by_state('complete')) end