From 3832eda78d1ec956b20ea3b4cff262db7da8ea16 Mon Sep 17 00:00:00 2001 From: Muhammad Adeel Tajamul <77053848+muhammadadeeltajamul@users.noreply.github.com> Date: Mon, 5 Jun 2023 14:29:07 +0500 Subject: [PATCH] fix: change response of course enrollment api for notifications --- openedx/core/djangoapps/notifications/serializers.py | 3 ++- openedx/core/djangoapps/notifications/views.py | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/openedx/core/djangoapps/notifications/serializers.py b/openedx/core/djangoapps/notifications/serializers.py index 2c5ae0194b..becbac4b63 100644 --- a/openedx/core/djangoapps/notifications/serializers.py +++ b/openedx/core/djangoapps/notifications/serializers.py @@ -26,7 +26,7 @@ class NotificationCourseEnrollmentSerializer(serializers.ModelSerializer): class Meta: model = CourseEnrollment - fields = ('course', 'is_active', 'mode') + fields = ('course',) class UserNotificationPreferenceSerializer(serializers.ModelSerializer): @@ -70,4 +70,5 @@ class NotificationSerializer(serializers.ModelSerializer): 'content_url', 'last_read', 'last_seen', + 'created', ) diff --git a/openedx/core/djangoapps/notifications/views.py b/openedx/core/djangoapps/notifications/views.py index 85f4fe1eb2..31a2c7ad54 100644 --- a/openedx/core/djangoapps/notifications/views.py +++ b/openedx/core/djangoapps/notifications/views.py @@ -38,8 +38,6 @@ class CourseEnrollmentListView(generics.ListAPIView): "id": (int) course_id, "display_name": (str) course_display_name }, - "is_active": (bool) is_enrollment_active, - "mode": (str) enrollment_mode }, ... ]