fix: change response of course enrollment api for notifications

This commit is contained in:
Muhammad Adeel Tajamul
2023-06-05 14:29:07 +05:00
committed by GitHub
parent 26b0977067
commit 3832eda78d
2 changed files with 2 additions and 3 deletions

View File

@@ -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',
)

View File

@@ -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
},
...
]