Skip to content

Commit

Permalink
serializer class for ShareDetail was missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Glatthard committed Aug 8, 2015
1 parent 3d94c75 commit ccf084c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ipynbsrv/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,11 @@ class ShareDetail(generics.RetrieveUpdateDestroyAPIView):
permission_classes = [ShareDetailPermissions]
queryset = Share.objects.all()

def get_serializer_class(self, *args, **kwargs):
if self.request.method in ['PATCH', 'POST', 'PUT']:
return FlatShareSerializer
return NestedShareSerializer


@api_view(['POST'])
def share_add_access_groups(request, pk):
Expand Down

0 comments on commit ccf084c

Please sign in to comment.