Skip to content

Commit

Permalink
Fix is liked view
Browse files Browse the repository at this point in the history
  • Loading branch information
LowerDeez committed Feb 18, 2021
1 parent 9947a23 commit f453896
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion likes/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def create(self, validated_data):
created=created,
request=self.context['request'],
like=like,
obj=validated_data['object']
obj=validated_data['instance']
)

return like
Expand Down
3 changes: 1 addition & 2 deletions likes/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ class IsLikedAPIView(GenericAPIView):
def post(self, request, *args, **kwargs):
serializer = self.get_serializer(data=request.data)
serializer.is_valid(raise_exception=True)

return Response(serializer.data)
return Response(serializer.validated_data)


class LikeListAPIView(ListAPIView):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='django-ok-likes',
version='0.6.2',
version='0.6.3',
description='Django likes app',
long_description=open('README.rst').read(),
author='Oleg Kleschunov',
Expand Down

0 comments on commit f453896

Please sign in to comment.