diff --git a/openedx/core/djangoapps/notifications/handlers.py b/openedx/core/djangoapps/notifications/handlers.py index f38322fc84..6aadfb9343 100644 --- a/openedx/core/djangoapps/notifications/handlers.py +++ b/openedx/core/djangoapps/notifications/handlers.py @@ -33,7 +33,7 @@ def course_enrollment_post_save(signal, sender, enrollment, metadata, **kwargs): course_id=enrollment.course.course_key ) except IntegrityError: - log.info(f'CourseNotificationPreference already exists for user {enrollment.user} ' + log.info(f'CourseNotificationPreference already exists for user {enrollment.user.id} ' f'and course {enrollment.course.course_key}')