Skip to content

Commit 3b7bf02

Browse files
committed
Handle displaying changes in an admin site with no user model view
1 parent 5779510 commit 3b7bf02

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

simple_history/templates/simple_history/object_history.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@
2828
<td>{{ action.get_history_type_display }}</td>
2929
<td>
3030
{% if action.history_user %}
31-
<a href="{% url admin_user_view action.history_user_id %}">{{ action.history_user }}</a>
31+
{% url admin_user_view action.history_user_id as admin_user_url %}
32+
{% if admin_user_url %}
33+
<a href="{{ admin_user_url }}">{{ action.history_user }}</a>
34+
{% else %}
35+
{{ action.history_user }}
36+
{% endif %}
3237
{% else %}
3338
None
3439
{% endif %}

0 commit comments

Comments
 (0)