diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-08-20 13:03:55 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-08-20 13:03:55 +0100 |
commit | bce48a138d6033b7e927ecd8b7b4cec6d15fbe62 (patch) | |
tree | 34636fed3fed9a37f4defd6e2316d13acb93118a | |
parent | 3d12cbe6ee7ff49dad9a473efc0792b2a4f4cba6 (diff) |
Handle case of nil user_id
When status was updated by a script.
-rw-r--r-- | app/views/admin_general/timeline.html.erb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/admin_general/timeline.html.erb b/app/views/admin_general/timeline.html.erb index 8fd8875b6..439ae1e68 100644 --- a/app/views/admin_general/timeline.html.erb +++ b/app/views/admin_general/timeline.html.erb @@ -88,7 +88,7 @@ <% elsif event.event_type == 'comment' %> had an annotation posted by <%=h event.comment.user.name %>. <% elsif event.event_type == 'status_update' %> - had its status updated by <%=h User.find(event.params[:user_id]).name %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'. + had its status updated by <%= event.params[:user_id] ? User.find(event.params[:user_id]).name : event.params[:script] %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'. <% else %> had '<%=event.event_type%>' done to it, parameters <%=h event.params_yaml%>. <% end %> |