small fix for deleted users

This commit is contained in:
Harry Bomrah 2017-09-26 11:00:28 +08:00
parent ea7800ed64
commit 0b70ae0ebf
1 changed files with 2 additions and 2 deletions

View File

@ -35,8 +35,8 @@
<% if !ticket.taken_by.nil? %> <% if !ticket.taken_by.nil? %>
<span class="ticket-author label label-primary"> <span class="ticket-author label label-primary">
<i class="icon-user"></i> <i class="icon-user"></i>
<% user = User.find(ticket.taken_by) %> <% user = User.find(ticket.taken_by) rescue nil %>
<%= user.name if !user.nil? %> <%= !user.nil? ? user.name : "User Deleted" %>
</span> </span>
<% end %> <% end %>
</div> </div>