mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
fix tests
This commit is contained in:
@@ -47,28 +47,30 @@ def invite_user_to_org(organization_id):
|
||||
current_app.config["ORGANIZATION_INVITATION_EMAIL_TEMPLATE_ID"]
|
||||
)
|
||||
|
||||
personalisation = {
|
||||
"user_name": (
|
||||
"The GOV.UK Notify team"
|
||||
if invited_org_user.invited_by.platform_admin
|
||||
else invited_org_user.invited_by.name
|
||||
),
|
||||
"organization_name": invited_org_user.organization.name,
|
||||
"url": invited_org_user_url(
|
||||
invited_org_user.id,
|
||||
data.get("invite_link_host"),
|
||||
),
|
||||
}
|
||||
saved_notification = persist_notification(
|
||||
template_id=template.id,
|
||||
template_version=template.version,
|
||||
recipient=invited_org_user.email_address,
|
||||
service=template.service,
|
||||
personalisation={
|
||||
"user_name": (
|
||||
"The GOV.UK Notify team"
|
||||
if invited_org_user.invited_by.platform_admin
|
||||
else invited_org_user.invited_by.name
|
||||
),
|
||||
"organization_name": invited_org_user.organization.name,
|
||||
"url": invited_org_user_url(
|
||||
invited_org_user.id,
|
||||
data.get("invite_link_host"),
|
||||
),
|
||||
},
|
||||
personalisation={},
|
||||
notification_type=EMAIL_TYPE,
|
||||
api_key_id=None,
|
||||
key_type=KEY_TYPE_NORMAL,
|
||||
reply_to_text=invited_org_user.invited_by.email_address,
|
||||
)
|
||||
saved_notification.personalisation = personalisation
|
||||
|
||||
send_notification_to_queue(saved_notification, queue=QueueNames.NOTIFY)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user