close fullscreen

Ticket

fix recent changes error (nil updated_at)+status
closed
help edit space_dashboard
fix recent changes error (nil updated_at)+priority
high
help edit space_dashboard
fix recent changes error (nil updated_at)+tag
Wagn 0.10+2
help edit space_dashboard
fix recent changes error (nil updated_at)+commit
 

fix recent changes error (nil updated_at)+issues

help edit space_dashboard

 ActionView::TemplateError (undefined method `year' for nil:NilClass) on line #14 of block/_recent_changes.rhtml:
[12:50pm] ethn: 11:      #FIXME - tis UGLY, we're getting cached cards, so get the real card to call
[12:50pm] ethn: 12:      # revised_at on.  the cards should already be there from the search results.
[12:50pm] ethn: 13:      real_card = card.respond_to?(:card) ? card.card : card
[12:50pm] ethn: 14:    day = Date.new(real_card.updated_at.year, real_card.updated_at.month, real_card.updated_at.day)
[12:50pm] ethn: 15:    cards_by_day[day] << card
[12:50pm] ethn: 16:  end
[12:50pm] ethn: 17: %>

 

fix recent changes error (nil updated_at)+solution

help edit space_dashboard

This was caused by a data problem: cards with wrong key for their name. 

The problem is contained now- (error renders in content doesn't break whole page)

And we've added some data consistency checks (db constraints, validations) but don't know that they will prevent this from happening.

 

 

 

fix recent changes error (nil updated_at)+discussed in support tickets

help edit space_dashboard