mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
Allow letter templates to select the default contact block from the list
This commit is contained in:
@@ -100,6 +100,9 @@ def template_json(service_id,
|
||||
archived=False,
|
||||
process_type='normal',
|
||||
redact_personalisation=None,
|
||||
service_letter_contact=None,
|
||||
reply_to=None,
|
||||
reply_to_text=None,
|
||||
):
|
||||
template = {
|
||||
'id': id_,
|
||||
@@ -111,6 +114,9 @@ def template_json(service_id,
|
||||
'updated_at': datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f'),
|
||||
'archived': archived,
|
||||
'process_type': process_type,
|
||||
'service_letter_contact': service_letter_contact,
|
||||
'reply_to': reply_to,
|
||||
'reply_to_text': reply_to_text,
|
||||
}
|
||||
if content is None:
|
||||
template['content'] = "template content"
|
||||
@@ -236,6 +242,7 @@ def notification_json(
|
||||
rows=5,
|
||||
personalisation=None,
|
||||
template_type=None,
|
||||
reply_to_text=None
|
||||
):
|
||||
if template is None:
|
||||
template = template_json(service_id, str(generate_uuid()), type_=template_type)
|
||||
@@ -283,6 +290,7 @@ def notification_json(
|
||||
'template_version': template['version'],
|
||||
'personalisation': personalisation or {},
|
||||
'notification_type': template_type,
|
||||
'reply_to_text': reply_to_text,
|
||||
} for i in range(rows)],
|
||||
'total': rows,
|
||||
'page_size': 50,
|
||||
|
||||
Reference in New Issue
Block a user