msjit / testcasedb

TestCaseDB - Web based test case management
MIT License
40 stars 18 forks source link

[Bug] Stencils show page fails to render if stencil has no description #78

Closed agramian closed 9 years ago

agramian commented 9 years ago

If no description is entered for a stencil (description is NULL in the database), the view fails to render with the following error.

undefined method `truncate' for nil:NilClass

The truncate method shouldn't be called unless a string is present, or the default value for the description field should be an empty string.

joffems commented 9 years ago

@agramian Fix has been pushed. Never noticed this before as the form normally records an empty string as the value.Out of interest, did you create the test plan via the API?

agramian commented 9 years ago

@joffems yes i created via the API Is it possible to this to occur on other views like test plans where the truncate method is used?

joffems commented 9 years ago

This can definitely occur on other pages. I'm going to have to do a search for .truncate( and then fix all the possible NPE exceptions.

joffems commented 9 years ago

@agramian I went digging through the code and I don't believe that this issue should occur anywhere else. Closing for now. Please re-open if you hit another issue.