feat: adding unenrollments to event bus (#33085)

* feat: adding unenrollments to event bus

* fix: quality fixes

* fix: tweaks to pass tests

* fix: more tweaks for testing

---------

Co-authored-by: John Nagro <jnagro@edx.org>
This commit is contained in:
Kira Miller
2023-08-28 09:08:49 -06:00
committed by GitHub
parent 2f8475c307
commit 776f4bf94e
4 changed files with 95 additions and 1 deletions

View File

@@ -46,7 +46,7 @@ def on_user_course_unenrollment(enrollment, **kwargs):
preference = CourseNotificationPreference.objects.get(user__id=user_id, course_id=course_key)
preference.delete()
except ObjectDoesNotExist:
log.info(f'Notification Preference doesnot exist for {enrollment.user.pii.username} in {course_key}')
log.info(f'Notification Preference does not exist for {enrollment.user.pii.username} in {course_key}')
@receiver(USER_NOTIFICATION_REQUESTED)