Skip to content

Commit

Permalink
Fix ListSerializer for UserPoints
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelGusse committed May 27, 2024
1 parent 0982189 commit bf16d60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion course/api/serializers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from rest_framework import serializers
from rest_framework.reverse import reverse

from exercise.cache.points import CachedPoints
from lib.api.fields import NestedHyperlinkedIdentityField
from lib.api.serializers import AplusModelSerializer, AlwaysListSerializer
from userprofile.api.serializers import UserBriefSerializer, UserMinimalListField
Expand Down Expand Up @@ -67,7 +68,7 @@ def get_summary_html(self, profile):

def get_points(self, profile):
return self._get_link_lookup('api:course-points-detail', profile)

def get_data(self, profile):
return self._get_link_lookup('api:course-submissiondata-detail', profile)

Expand Down
2 changes: 1 addition & 1 deletion exercise/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ class CoursePointsViewSet(ListSerializerMixin,
lookup_url_kwarg = 'user_id'
lookup_value_regex = REGEX_INT_ME
parent_lookup_map = {}
listserializer_class = StudentBriefSerializer
listserializer_class = UserPointsSerializer
serializer_class = UserPointsSerializer

def get_queryset(self):
Expand Down

0 comments on commit bf16d60

Please sign in to comment.