Skip to content

Commit

Permalink
Be more robust for comments and deleted users.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrillkuettel committed Aug 18, 2024
1 parent a71c92f commit 01f45cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/privatim/layouts/macros.pt
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@
/>
<div>
<h6 class="fw-bold text-primary mb-1">
<a href="${request.route_url('person', id=comment.user.id)}">
${comment.user.fullname or comment.user.email}</a>
<a href="${request.route_url('person', id=comment.user.id)}" tal:condition="comment.user">${comment.user.fullname}</a>
<a href="#" tal:condition="not comment.user" i18n:translate="">Deleted User</a>
</h6>
<p class="text-muted mb-0">
${layout.format_date(comment.created, 'relative')}
Expand Down Expand Up @@ -163,8 +163,8 @@
/>
<div>
<h6 class="fw-bold text-primary mb-1">
<a href="${request.route_url('person', id=comment.user.id)}">
${comment.user.fullname or comment.user.email}</a>
<a href="${request.route_url('person', id=comment.user.id)}" tal:condition="comment.user">${comment.user.fullname}</a>
<a href="#" tal:condition="not comment.user" i18n:translate="">Deleted User</a>
</h6>
<p class="text-muted mb-0">
${layout.format_date(comment.created, 'relative')}
Expand Down
5 changes: 3 additions & 2 deletions src/privatim/views/templates/search_results.pt
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@
height="60"
/>
<div>
<h6 class="fw-bold text-primary mb-1">
<a href="${request.route_url('person', id=comment.user.id)}">${comment.user.fullname}</a>
<h6 class="fw-bold text-primary mb-1" >
<a href="${request.route_url('person', id=comment.user.id)}" tal:condition="comment.user">${comment.user.fullname}</a>
<a href="#" tal:condition="not comment.user" i18n:translate="">Deleted User</a>
</h6>
<p class="text-muted small mb-0">${layout.format_date(comment.created, 'relative')}</p>
</div>
Expand Down

0 comments on commit 01f45cf

Please sign in to comment.