From f1f9b5b2e8afd7d0184144366671c28ea10f60ff Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 19 Sep 2012 15:19:30 +1000 Subject: [PATCH] Make order and distributor report resilient to orders without distributors --- lib/open_food_web/order_and_distributor_report.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_food_web/order_and_distributor_report.rb b/lib/open_food_web/order_and_distributor_report.rb index eafd1886a9..a477fd0edd 100644 --- a/lib/open_food_web/order_and_distributor_report.rb +++ b/lib/open_food_web/order_and_distributor_report.rb @@ -22,7 +22,7 @@ module OpenFoodWeb order.bill_address.full_name, order.email, order.bill_address.phone, order.bill_address.city, line_item.product.sku, line_item.product.name, line_item.variant.options_text, line_item.quantity, line_item.max_quantity, line_item.price * line_item.quantity, line_item.itemwise_shipping_cost, order.payments.first.payment_method.andand.name, - order.distributor.name, order.distributor.pickup_address.address1, order.distributor.pickup_address.city, order.distributor.pickup_address.zipcode, order.special_instructions ] + order.distributor.andand.name, order.distributor.pickup_address.address1, order.distributor.pickup_address.city, order.distributor.pickup_address.zipcode, order.special_instructions ] end end order_and_distributor_details