Verified Commit bdf93479 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Fixed serialization error

parent 64e88b83
......@@ -239,7 +239,7 @@ class APILibraryCreateSerializer(serializers.ModelSerializer):
return validated_data
def create(self, validated_data):
library = models.Library.objects.get_or_create(
library = models.Library.objects.update_or_create(
url=validated_data['library']['id'],
defaults={
'actor': validated_data['actor'],
......
......@@ -68,7 +68,7 @@ class InstanceActorViewSet(FederationMixin, viewsets.GenericViewSet):
data = handler(request.data, actor=request.actor)
except NotImplementedError:
return response.Response(status=405)
return response.Response(data, status=200)
return response.Response({}, status=200)
@detail_route(methods=['get', 'post'])
def outbox(self, request, *args, **kwargs):
......@@ -80,7 +80,7 @@ class InstanceActorViewSet(FederationMixin, viewsets.GenericViewSet):
data = handler(request.data, actor=request.actor)
except NotImplementedError:
return response.Response(status=405)
return response.Response(data, status=200)
return response.Response({}, status=200)
class WellKnownViewSet(FederationMixin, viewsets.GenericViewSet):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment