Skip to content

Commit

Permalink
Merge pull request #1551 from ZachariahMathews/master
Browse files Browse the repository at this point in the history
Fix nil string in heat-grid
  • Loading branch information
ZachariahMathews committed Oct 25, 2019
2 parents 02c0cfa + 8c7a78b commit 832f3b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/views/grades/view_team.html.erb
Expand Up @@ -134,7 +134,8 @@

<!-- actual cells with scores and colored background. -->
<% row.score_row.each do |score| %>
<td class="<%= score.color_code %>" align="center" data-toggle="tooltip" title="<%= strip_tags(score.comment).html_safe%>">
<% score_comment = score.comment.nil? ? '' : score.comment %> <!-- changing nil to null string to avoid Null Pointer Exception -->
<td class="<%= score.color_code %>" align="center" data-toggle="tooltip" title="<%= strip_tags(score_comment).html_safe%>">
<span class="<%= underlined?(score) %>"><%= score.score_value.to_s %></span>
</td>
<% end %>
Expand Down

0 comments on commit 832f3b0

Please sign in to comment.