mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-05 01:51:28 -04:00
Merge pull request #1347 from alphagov/dict-key-conflict
Mutate dictionary instead of creating new one
This commit is contained in:
@@ -115,16 +115,9 @@ def get_all_personalisation_from_notification(notification):
|
||||
notification['personalisation'] = {}
|
||||
|
||||
if notification['template']['template_type'] == 'email':
|
||||
return dict(
|
||||
email_address=notification['to'],
|
||||
**notification['personalisation']
|
||||
)
|
||||
notification['personalisation']['email_address'] = notification['to']
|
||||
|
||||
if notification['template']['template_type'] == 'sms':
|
||||
return dict(
|
||||
phone_number=notification['to'],
|
||||
**notification['personalisation']
|
||||
)
|
||||
notification['personalisation']['phone_number'] = notification['to']
|
||||
|
||||
if notification['template']['template_type'] == 'letter':
|
||||
return notification['personalisation']
|
||||
return notification['personalisation']
|
||||
|
||||
Reference in New Issue
Block a user