A small refactor to use the SMS_TYPE and EMAIL_TYPE in code rather that 'sms' or 'email'

This commit is contained in:
Rebecca Law
2016-06-30 15:41:51 +01:00
parent a26d2a2551
commit 3f11447bc8
6 changed files with 10 additions and 7 deletions

View File

@@ -18,6 +18,7 @@ from app.dao import (
services_dao,
notifications_dao
)
from app.models import NOTIFICATION_TYPE, SMS_TYPE
from app.notifications.process_client_response import (
validate_callback_data,
process_sms_client_response
@@ -333,7 +334,7 @@ def send_notification(notification_type):
notification_id = create_uuid()
notification.update({"template_version": template.version})
if notification_type == 'sms':
if notification_type == SMS_TYPE:
send_sms.apply_async((
service_id,
notification_id,