if preferences_json:
# convert the preference exist for the student and class from redis
preferences = json.loads(preferences_json)
# extract email & webhook_url preferences
email = preferences.get("email", "")
webhook_url = preferences.get("webhook_url", "")
enrollment_service/enrollment_helper.py
Original Code: