added a fix for deleted users
This commit is contained in:
parent
fd3f22abaa
commit
e012d9d337
|
@ -43,7 +43,7 @@
|
|||
<h3 class="ticket-heading">#<%= @ticket.uid %> - <%= @ticket.subject[0..50] %>
|
||||
<% if !@ticket.taken_by.nil? %>
|
||||
<% user = User.find(@ticket.taken_by) %>
|
||||
<% if user.member_profile.avatar.nil? || user.member_profile.avatar.thumb.url == "thumb_person.png"
|
||||
<% if user.nil? || user.member_profile.avatar.nil? || user.member_profile.avatar.thumb.url == "thumb_person.png"
|
||||
avatar = "/assets/thumb_person.png"
|
||||
else
|
||||
avatar = user.member_profile.avatar.thumb.url
|
||||
|
@ -51,7 +51,7 @@
|
|||
%>
|
||||
<div class="ticket-heading-avatar tool-tip-parent">
|
||||
<img class="t-avatar" src="<%= avatar %>">
|
||||
<span class="ticket-heading-avatar-name tool-tip"><%= user.name %></span>
|
||||
<span class="ticket-heading-avatar-name tool-tip"><%= user.name rescue "Member was deleted" %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
</h3>
|
||||
|
|
Loading…
Reference in New Issue