Revert "Merge pull request #1336 from alphagov/revert-show-notifications"

This reverts commit 7e354ff341, reversing
changes made to 6f3bcff32f.
This commit is contained in:
Chris Hill-Scott
2017-06-24 17:12:45 +01:00
parent 8115dab8e4
commit 9f20ea4b7e
21 changed files with 223 additions and 196 deletions

View File

@@ -105,6 +105,8 @@ def template_json(service_id,
'archived': archived,
'process_type': process_type,
}
if subject is None and type_ != 'sms':
template['subject'] = "template subject"
if subject is not None:
template['subject'] = subject
if redact_personalisation is not None:
@@ -184,7 +186,7 @@ def job_json(
if job_id is None:
job_id = str(generate_uuid())
if template_id is None:
template_id = str(generate_uuid())
template_id = "5d729fbd-239c-44ab-b498-75a985f3198f"
if created_at is None:
created_at = str(datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S.%f%z'))
data = {
@@ -220,7 +222,8 @@ def notification_json(
created_at=None,
updated_at=None,
with_links=False,
rows=5
rows=5,
personalisation=None,
):
if template is None:
template = template_json(service_id, str(generate_uuid()))
@@ -259,7 +262,8 @@ def notification_json(
'updated_at': updated_at,
'job_row_number': job_row_number,
'service': service_id,
'template_version': template['version']
'template_version': template['version'],
'personalisation': personalisation or {},
} for i in range(rows)],
'total': rows,
'page_size': 50,