1
0
Fork 0

Don't assume that link domains have a known user

This is an edge case, and they OUGHT to have a user, but if the user was
deleted for a remote link, the field won't be able to resolve and the
user will be unset.
This commit is contained in:
Mouse Reeve 2022-07-05 16:51:03 -07:00
parent f7e02061cb
commit 0be4fec167
2 changed files with 9 additions and 1 deletions

View file

@ -15,7 +15,11 @@
<a href="{{ link.url }}" target="_blank" rel="noopener noreferrer">{{ link.url }}</a>
</td>
<td>
{% if link.added_by %}
<a href="{% url 'settings-user' link.added_by.id %}">@{{ link.added_by|username }}</a>
{% else %}
<em>{% trans "Unknown user" %}</em>
{% endif %}
</td>
<td>
{% if link.filelink.filetype %}