fix invites

This commit is contained in:
Kenneth Kehl
2025-04-07 12:27:59 -07:00
parent ecb5747b7b
commit 14de65816f

View File

@@ -186,7 +186,15 @@ def send_email_to_provider(notification):
personalisation = redis_store.get(f"email-personalisation-{notification.id}")
if personalisation:
personalisation = personalisation.decode("utf-8")
notification.personalisation = json.loads(personalisation)
p = json.loads(personalisation)
if os.get("NOTIFY_ENVIRONMENT") == "staging":
current_app.logger.info(f"Invite personalization before {p}")
p = p.replace("%5B", "")
p = p.replace("%5D", "")
if os.get("NOTIFY_ENVIRONMENT") == "staging":
current_app.logger.info(f"Invite personalization after {p}")
notification.personalisation = p
service = SerialisedService.from_id(notification.service_id)
if not service.active: