diff --git a/wagtail/admin/templates/wagtailadmin/pages/workflow_history/detail.html b/wagtail/admin/templates/wagtailadmin/pages/workflow_history/detail.html index 25c66392cc..1814955135 100644 --- a/wagtail/admin/templates/wagtailadmin/pages/workflow_history/detail.html +++ b/wagtail/admin/templates/wagtailadmin/pages/workflow_history/detail.html @@ -55,9 +55,15 @@ {% trans "Initial Revision" %} {% else %} {% if not forloop.first %} - {% blocktrans with revision.user.get_full_name|default:revision.user.get_username as who and revision.created_at as at %} - Page edited by {{ who }} at {{ at }} - {% endblocktrans %} + {% if revision.user %} + {% blocktrans with revision.user.get_full_name|default:revision.user.get_username as who and revision.created_at as at %} + Page edited by {{ who }} at {{ at }} + {% endblocktrans %} + {% else %} + {% blocktrans with revision.created_at as at %} + Page edited at {{ at }} + {% endblocktrans %} + {% endif %} {% endif %} {% endif %} @@ -94,9 +100,15 @@ {% trans "Workflow completed" %}
{{ timeline_item.workflow_state.get_status_display }}
{% elif timeline_item.action == 'page_edited' %} - {% blocktrans with timeline_item.revision.user.get_full_name|default:timeline_item.revision.user.get_username as who and timeline_item.revision.created_at as at %} - Page edited by {{ who }} at {{ at }} - {% endblocktrans %} + {% if revision.user %} + {% blocktrans with timeline_item.revision.user.get_full_name|default:timeline_item.revision.user.get_username as who and timeline_item.revision.created_at as at %} + Page edited by {{ who }} at {{ at }} + {% endblocktrans %} + {% else %} + {% blocktrans with timeline_item.revision.created_at as at %} + Page edited at {{ at }} + {% endblocktrans %} + {% endif %} {% elif timeline_item.action == 'task_completed' %} {{ timeline_item.task_state.task }}