diff --git a/app/delivery/send_to_providers.py b/app/delivery/send_to_providers.py index cecddd98b..9f0513c85 100644 --- a/app/delivery/send_to_providers.py +++ b/app/delivery/send_to_providers.py @@ -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: