1
0
mirror of https://github.com/etesync/server synced 2024-12-29 02:38:07 +00:00

CollectionMember: fix collection list to return data in the right format.

This commit is contained in:
Tom Hacohen 2020-05-27 16:51:12 +03:00
parent e159bf971b
commit f6960bb8cb

View File

@ -449,6 +449,16 @@ class CollectionMemberViewSet(BaseViewSet):
return queryset.filter(collection=collection)
def list(self, request, collection_uid=None):
queryset = self.get_queryset()
serializer = self.get_serializer(queryset, many=True)
ret = {
'data': serializer.data,
}
return Response(ret)
def create(self, request):
return Response(status=status.HTTP_405_METHOD_NOT_ALLOWED)