srushti/goldberg

culprits code can cause home page not to render

Closed this issue · 2 comments

Error....

Rendered home/_projects.html.haml (264.0ms)
Rendered home/_group_projects.html.haml (265.4ms)
Completed 500 Internal Server Error in 397ms

ActionView::Template::Error (undefined method revision' for nil:NilClass): 16: %span.github-url 17: = link_to "on Github", project.github_url 18: - if !project.culprits_for_failure.empty? 19: %span.culprit 20: = "(Possible culprit(s): #{project.culprits_for_failure})" app/models/project.rb:103:incollect'
app/models/project.rb:103:in culprits_for_failure' app/views/home/_projects.html.haml:19:inblock in _app_views_home__projects_html_haml___4386309075124752201_70226169489640__99748641549855113'
app/views/home/_projects.html.haml:1:in each' app/views/home/_projects.html.haml:1:in_app_views_home__projects_html_haml___4386309075124752201_70226169489640__99748641549855113'
app/views/home/_group_projects.html.haml:7:in block in _app_views_home__group_projects_html_haml___3791502564093199432_70226169760640__4108929104030263289' app/views/home/_group_projects.html.haml:5:ineach'
app/views/home/_group_projects.html.haml:5:in _app_views_home__group_projects_html_haml___3791502564093199432_70226169760640__4108929104030263289' app/controllers/home_controller.rb:10:inprojects_partial'

A quick fix is to comment out the culprit code in the view/home/_project.html.haml
-# if !project.culprits_for_failure.empty?
%span.culprit
= "(Possible culprit(s): #{project.culprits_for_failure})"

Yeah. I saw this happening when you add a new project and there are no builds on it. I thought I'd fixed it already a couple of months back. Clearly, I haven't.

I'll take a look at it.

I took a look at it later, but forgot to update it. This doesn't seem to be happening any more. Please let me know if this is still occurring for you. It's not for me.