Merge pull request #741 from alphagov/fix-v2-post-notification

Small fixes for the V2 post notification endpoints
This commit is contained in:
Rebecca Law
2016-11-22 16:28:13 +00:00
committed by GitHub
4 changed files with 17 additions and 13 deletions

View File

@@ -107,7 +107,7 @@ post_sms_response = {
"title": "response v2/notifications/sms",
"properties": {
"id": uuid,
"reference": {"type": "string"},
"reference": {"type": ["string", "null"]},
"content": sms_content,
"uri": {"type": "string"},
"template": template
@@ -150,7 +150,7 @@ post_email_response = {
"title": "response v2/notifications/email",
"properties": {
"id": uuid,
"reference": {"type": "string"},
"reference": {"type": ["string", "null"]},
"content": email_content,
"uri": {"type": "string"},
"template": template

View File

@@ -38,7 +38,7 @@ def post_sms_notification():
notification_type=SMS_TYPE,
api_key_id=api_user.id,
key_type=api_user.key_type,
reference=form['reference'])
reference=form.get('reference'))
send_notification_to_queue(notification, service.research_mode)
resp = create_post_sms_response_from_notification(notification,
@@ -65,7 +65,7 @@ def post_email_notification():
notification_type=EMAIL_TYPE,
api_key_id=api_user.id,
key_type=api_user.key_type,
reference=form['reference'])
reference=form.get('reference'))
send_notification_to_queue(notification, service.research_mode)