Skip to content

Commit

Permalink
Merge pull request #521 from akatsoulas/500-no-profile
Browse files Browse the repository at this point in the history
Fix 500 on deleted profiles
  • Loading branch information
akatsoulas authored Oct 7, 2024
2 parents 4e4f70e + 44ab639 commit 7d78997
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions moderator/moderate/templates/includes/moderator_macros.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% macro user_profile(user, is_anonymous=True) %}
<div class="askedby">
{% if user %}
{% if not is_anonymous %}
<a href="https://people.mozilla.org/s/?query={{ user.userprofile.username }}&who=staff" target="_blank">
<img alt="User profile image" src="{{ get_profile_image(user, is_anonymous) }}"
Expand All @@ -11,6 +12,10 @@
title="{% if is_anonymous %}anonymous{% else %}{{ user.userprofile.username }}{% endif %}" data-toggle="tooltip"
data-placement="bottom" />
{% endif %}
{% else %}
<img alt="profile image" src="{{ static('img/unknown.png') }}" title="anonymous" data-toggle="tooltip"
data-placement="bottom" />
{% endif %}
</div>
{% endmacro %}

Expand Down

0 comments on commit 7d78997

Please sign in to comment.