mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 16:31:15 -05:00
The send_sms task will created the notification with a status = created.
The encrypted_notification for the send_sms_to_provider task has been made optional.
This commit is contained in:
@@ -55,12 +55,9 @@ def send_sms_to_provider(self, service_id, notification_id, encrypted_notificati
|
||||
provider = provider_to_use('sms', notification_id)
|
||||
notification = get_notification_by_id(notification_id)
|
||||
|
||||
# notification_json = encryption.decrypt(encrypted_notification)
|
||||
|
||||
template = Template(
|
||||
dao_get_template_by_id(notification.template_id, notification.template_version).__dict__,
|
||||
values=notification.personalisation['personalisation'] if notification.personalisation[
|
||||
'personalisation'] else {},
|
||||
values={} if not notification.personalisation else notification.personalisation,
|
||||
prefix=service.name
|
||||
)
|
||||
try:
|
||||
|
||||
@@ -247,9 +247,7 @@ def _update_notification_status(notification, status, notification_statistics_st
|
||||
@transactional
|
||||
def update_notification_status_by_id(notification_id, status, notification_statistics_status=None):
|
||||
notification = Notification.query.filter(
|
||||
Notification.id == notification_id,
|
||||
or_(Notification.status == 'sending',
|
||||
Notification.status == 'pending')).first()
|
||||
Notification.id == notification_id).first()
|
||||
|
||||
if not notification:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user