mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Updated the precompiled response to only include the notification id
and the client reference. It could confuse the client consumer so best to remove it from the response altogether. * Respond with only the notification_id and client_reference * Updated the test to check for the response without the template
This commit is contained in:
@@ -92,20 +92,10 @@ def post_precompiled_letter_notification():
|
||||
precompiled=True
|
||||
)
|
||||
|
||||
create_resp_partial = functools.partial(
|
||||
create_post_letter_response_from_notification,
|
||||
subject=template.subject,
|
||||
)
|
||||
|
||||
resp = create_resp_partial(
|
||||
notification=notification,
|
||||
content=None,
|
||||
url_root=request.url_root,
|
||||
scheduled_for=None,
|
||||
)
|
||||
|
||||
# Precompile should be the same as a letter without the template as its auto generated
|
||||
resp.pop('template', None)
|
||||
resp = {
|
||||
'id': notification.id,
|
||||
'reference': notification.client_reference
|
||||
}
|
||||
|
||||
return jsonify(resp), 201
|
||||
|
||||
|
||||
Reference in New Issue
Block a user