Growstuff / growstuff

Open data project for small-scale food growers

Home Page:http://growstuff.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ActionView::Template::Error (Failed to parse "2024-02-27" - invalid date):

CloCkWeRX opened this issue · comments

https://www.growstuff.org/members/clockwerx/plantings.ics

app/views/plantings/index.ics.erb:33

2024-02-04T02:08:20.565815+00:00 app[web.1]: [9c5eb5e7-3ab3-446a-847c-db0008baa7e7]     30: 
2024-02-04T02:08:20.565816+00:00 app[web.1]: [9c5eb5e7-3ab3-446a-847c-db0008baa7e7]     31:   if finish_date && finish_date > Date.today
2024-02-04T02:08:20.565816+00:00 app[web.1]: [9c5eb5e7-3ab3-446a-847c-db0008baa7e7]     32:     todo = Icalendar::Todo.new
2024-02-04T02:08:20.565817+00:00 app[web.1]: [9c5eb5e7-3ab3-446a-847c-db0008baa7e7]     33:     todo.dtstart = planting['first_harvest_predicted_at'] || finish_date || Date.today
2024-02-04T02:08:20.565818+00:00 app[web.1]: [9c5eb5e7-3ab3-446a-847c-db0008baa7e7]     34:     todo.due = finish_date
2024-02-04T02:08:20.565818+00:00 app[web.1]: [9c5eb5e7-3ab3-446a-847c-db0008baa7e7]     35:     todo.summary = "Harvest #{planting['crop_name']}"
2024-02-04T02:08:20.565818+00:00 app[web.1]: [9c5eb5e7-3ab3-446a-847c-db0008baa7e7]     36: 

planting['first_harvest_predicted_at'] should be a datetime or nil.

Should be covered for

        expect(events[1].dtstart.to_datetime.to_i).to be_within(1.second).of @predictable_planting.created_at.to_i