From 29246c15feb2cef918e2d797897a70329decd1e4 Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Fri, 12 Jun 2020 16:33:00 +0200 Subject: [PATCH] Defend from order without billing address This a data integrity issue that needs deeper investigation but while this happens, our users can still render their reports. --- lib/open_food_network/order_cycle_management_report.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/open_food_network/order_cycle_management_report.rb b/lib/open_food_network/order_cycle_management_report.rb index 73a0ea34db..e1f35eed6a 100644 --- a/lib/open_food_network/order_cycle_management_report.rb +++ b/lib/open_food_network/order_cycle_management_report.rb @@ -69,12 +69,12 @@ module OpenFoodNetwork def payment_method_row(order) ba = order.billing_address - [ba.firstname, - ba.lastname, + [ba.andand.firstname, + ba.andand.lastname, order.distributor.andand.name, customer_code(order.email), order.email, - ba.phone, + ba.andand.phone, order.shipping_method.andand.name, order.payments.first.andand.payment_method.andand.name, order.payments.first.andand.amount,