diff --git a/app/__init__.py b/app/__init__.py index 08821bb56..a73b20125 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -282,11 +282,11 @@ def format_notification_status(status, template_type): }.get(template_type).get(status, status) -def format_notification_status_as_time(status, when): +def format_notification_status_as_time(status, created, updated): return { - 'sending': ' since {}'.format(when), - 'created': ' since {}'.format(when) - }.get(status, when) + 'sending': ' since {}'.format(created), + 'created': ' since {}'.format(created) + }.get(status, updated) def format_notification_status_as_field_status(status): diff --git a/app/templates/components/table.html b/app/templates/components/table.html index a97783247..97783ff93 100644 --- a/app/templates/components/table.html +++ b/app/templates/components/table.html @@ -113,6 +113,7 @@ {% endif %} {{ notification.status|format_notification_status_as_time( + notification.created_at|format_datetime_short, (notification.updated_at or notification.created_at)|format_datetime_short ) }}