Fix 500 on job page when notifications are sending

Sending notifications don’t have an `updated_at`. This causes the time
formatting to throw a wobly, because it doesn’t expect `None`.

This commit changes the template to also look for the `created_at`,
which all notifications have.
This commit is contained in:
Chris Hill-Scott
2016-06-06 13:30:39 +01:00
parent 3ddc1d171d
commit 5b5ad2c5dc
2 changed files with 2 additions and 2 deletions

View File

@@ -28,7 +28,7 @@
align='right',
status='error' if item.status == 'Failed' else 'default'
) %}
{{ item.status|format_notification_status }} at {{ item.updated_at|format_time }}
{{ item.status|format_notification_status }} at {{ (item.updated_at or item.created_at)|format_time }}
{% endcall %}
{% endcall %}
{% else %}

View File

@@ -94,7 +94,7 @@
{{ text_field(item.status|format_notification_status) }}
{% call field(align='right') %}
{{ item.updated_at|format_datetime_short }}
{{ (item.updated_at or item.created_at)|format_datetime_short }}
{% endcall %}
{% endcall %}