Skip to content

Commit

Permalink
Handle displaying changes in an admin site with no user model view
Browse files Browse the repository at this point in the history
  • Loading branch information
macro1 committed Sep 5, 2014
1 parent 5779510 commit 3b7bf02
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion simple_history/templates/simple_history/object_history.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
<td>{{ action.get_history_type_display }}</td>
<td>
{% if action.history_user %}
<a href="{% url admin_user_view action.history_user_id %}">{{ action.history_user }}</a>
{% url admin_user_view action.history_user_id as admin_user_url %}
{% if admin_user_url %}
<a href="{{ admin_user_url }}">{{ action.history_user }}</a>
{% else %}
{{ action.history_user }}
{% endif %}
{% else %}
None
{% endif %}
Expand Down

0 comments on commit 3b7bf02

Please sign in to comment.