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:05:57 +0100 |
commit | 49eae0efd6064ff693752feb33924c82ebf15acc (patch) | |
tree | 189a74dd1988a8e8229dc24268eea28aff21f7ae | |
parent | 4b95ccffc468c256d6ba6248303dd2b78bf5896a (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 %> |