From 868505dbb8df325c8e2e04ba393d1efcbc521d74 Mon Sep 17 00:00:00 2001 From: Waheed Ahmad Date: Thu, 16 Jun 2022 16:48:16 +0500 Subject: [PATCH] fix: braze track call for email address change (#30606) --- common/djangoapps/student/signals/receivers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/djangoapps/student/signals/receivers.py b/common/djangoapps/student/signals/receivers.py index dfdaf626bf..6d0cf4f061 100644 --- a/common/djangoapps/student/signals/receivers.py +++ b/common/djangoapps/student/signals/receivers.py @@ -109,11 +109,11 @@ def _listen_for_user_email_changed(sender, user, **kwargs): """ If user has changed their email, update that in email Braze. """ email = user.email user_id = user.id - attributes = {'email': email, 'external_id': user_id} + attributes = [{'email': email, 'external_id': user_id}] try: braze_client = get_braze_client() if braze_client: braze_client.track_user(attributes=attributes) except Exception as exc: # pylint: disable=broad-except - logger.warning(f'Unable to sync new email [{email}] with Braze for user [{user_id}]: {str(exc)}') + logger.exception(f'Unable to sync new email [{email}] with Braze for user [{user_id}]')