mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 15:15:38 -05:00
Update utils to 12.0.0
Includes:
- [x] https://github.com/alphagov/notifications-utils/pull/94 (breaking
changes which are responsible for all the changes to the API in
this PR)
The test for `get_sms_fragment_count` has been removed because this
method is already tested in utils here:
ac20f7e99e/tests/test_base_template.py (L140-L159)
This commit is contained in:
@@ -42,7 +42,7 @@ def post_sms_notification():
|
||||
send_notification_to_queue(notification, service.research_mode)
|
||||
sms_sender = service.sms_sender if service.sms_sender else current_app.config.get('FROM_NUMBER')
|
||||
resp = create_post_sms_response_from_notification(notification,
|
||||
template_with_content.rendered,
|
||||
str(template_with_content),
|
||||
sms_sender,
|
||||
request.url_root)
|
||||
return jsonify(resp), 201
|
||||
@@ -70,7 +70,7 @@ def post_email_notification():
|
||||
send_notification_to_queue(notification, service.research_mode)
|
||||
|
||||
resp = create_post_email_response_from_notification(notification=notification,
|
||||
content=template_with_content.rendered,
|
||||
content=str(template_with_content),
|
||||
subject=template_with_content.subject,
|
||||
email_from=service.email_from,
|
||||
url_root=request.url_root)
|
||||
@@ -89,5 +89,6 @@ def __validate_template(form, service, notification_type):
|
||||
check_template_is_for_notification_type(notification_type, template.template_type)
|
||||
check_template_is_active(template)
|
||||
template_with_content = create_content_for_notification(template, form.get('personalisation', {}))
|
||||
check_sms_content_char_count(template_with_content.content_count)
|
||||
if template.template_type == SMS_TYPE:
|
||||
check_sms_content_char_count(template_with_content.content_count)
|
||||
return template, template_with_content
|
||||
|
||||
Reference in New Issue
Block a user