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.
This commit is contained in:
Pau Perez
2020-06-12 16:33:00 +02:00
parent e725f33318
commit 29246c15fe

View File

@@ -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,