mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
Add contact block to serialize template for v2
This attribute has been requested by a user, and we have not been serializing it so far.
This commit is contained in:
@@ -182,6 +182,7 @@ def create_template(
|
||||
folder=None,
|
||||
postage=None,
|
||||
process_type='normal',
|
||||
contact_block_id=None
|
||||
):
|
||||
data = {
|
||||
'name': template_name or '{} Template Name'.format(template_type),
|
||||
@@ -192,10 +193,12 @@ def create_template(
|
||||
'reply_to': reply_to,
|
||||
'hidden': hidden,
|
||||
'folder': folder,
|
||||
'process_type': process_type
|
||||
'process_type': process_type,
|
||||
}
|
||||
if template_type == LETTER_TYPE:
|
||||
data["postage"] = postage or "second"
|
||||
if contact_block_id:
|
||||
data['service_letter_contact_id'] = contact_block_id
|
||||
if template_type != SMS_TYPE:
|
||||
data['subject'] = subject
|
||||
template = Template(**data)
|
||||
|
||||
Reference in New Issue
Block a user