fix email notifications missing personalisation (notify-api-853)

This commit is contained in:
Kenneth Kehl
2024-03-13 10:52:55 -07:00
parent 8fe70fe14d
commit a8640a65b6
2 changed files with 36 additions and 0 deletions

View File

@@ -1,6 +1,9 @@
import json
from flask import Blueprint, abort, current_app, jsonify, request
from sqlalchemy.exc import IntegrityError
from app import redis_store
from app.config import QueueNames
from app.dao.annual_billing_dao import set_default_free_allowance_for_service
from app.dao.dao_utils import transaction
@@ -210,6 +213,12 @@ def send_notifications_on_mou_signed(organization_id):
reply_to_text=notify_service.get_default_reply_to_email_address(),
)
saved_notification.personalisation = personalisation
redis_store.set(
f"email-personalisation-{saved_notification.id}",
json.dumps(personalisation),
ex=60 * 60,
)
send_notification_to_queue(saved_notification, queue=QueueNames.NOTIFY)
personalisation = {