From 233d740df880e3ea590aa1fc9439cfe30593176f Mon Sep 17 00:00:00 2001 From: Skud Date: Tue, 1 Oct 2013 12:21:31 +1000 Subject: [PATCH] Fixed error with blank planting/plant_before dates --- app/views/plantings/index.csv.shaper | 2 +- app/views/seeds/index.csv.shaper | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/plantings/index.csv.shaper b/app/views/plantings/index.csv.shaper index d62996eb9..becb6d4d8 100644 --- a/app/views/plantings/index.csv.shaper +++ b/app/views/plantings/index.csv.shaper @@ -32,7 +32,7 @@ csv.headers :id, csv.cells :quantity, :planted_from, :sunniness - csv.cell :date_planted, p.planted_at.to_s(:db) + csv.cell :date_planted, p.planted_at ? p.planted_at.to_s(:db) : '' csv.cell :description diff --git a/app/views/seeds/index.csv.shaper b/app/views/seeds/index.csv.shaper index ce1f1497b..818e68909 100644 --- a/app/views/seeds/index.csv.shaper +++ b/app/views/seeds/index.csv.shaper @@ -29,7 +29,7 @@ csv.headers :id, csv.cell :quantity - csv.cell :plant_before, s.plant_before.to_s(:db) + csv.cell :plant_before, s.plant_before ? s.plant_before.to_s(:db) : '' csv.cell :tradable_to csv.cell :from_location, s.owner.location