Only return unique authorized_tools
This commit is contained in:
parent
77d961376e
commit
35c4ae4925
|
@ -66,7 +66,7 @@ class ProfileSerializer(serializers.HyperlinkedModelSerializer):
|
|||
fields = '__all__'
|
||||
|
||||
def get_authorized_tools(self, obj):
|
||||
return [tool.slug for tool in models.Tool.objects.filter(course__profile=obj)]
|
||||
return set([tool.slug for tool in models.Tool.objects.filter(course__profile=obj)])
|
||||
|
||||
class UserSerializer(serializers.ModelSerializer):
|
||||
profile = ProfileSerializer(read_only=True)
|
||||
|
|
Loading…
Reference in New Issue
Block a user