mirror of
https://github.com/pinry/pinry.git
synced 2025-11-14 17:05:50 +01:00
Fix: Image should be both readable and writable
This commit is contained in:
@@ -43,7 +43,6 @@ class ImageSerializer(serializers.ModelSerializer):
|
|||||||
extra_kwargs = {
|
extra_kwargs = {
|
||||||
"width": {"read_only": True},
|
"width": {"read_only": True},
|
||||||
"height": {"read_only": True},
|
"height": {"read_only": True},
|
||||||
"image": {"read_only": True},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
standard = ThumbnailSerializer(read_only=True)
|
standard = ThumbnailSerializer(read_only=True)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class ImageViewSet(mixins.CreateModelMixin, GenericViewSet):
|
|||||||
serializer_class = api.ImageSerializer
|
serializer_class = api.ImageSerializer
|
||||||
|
|
||||||
def create(self, request, *args, **kwargs):
|
def create(self, request, *args, **kwargs):
|
||||||
super(ImageViewSet, self).create(request, *args, **kwargs)
|
return super(ImageViewSet, self).create(request, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class PinViewSet(viewsets.ModelViewSet):
|
class PinViewSet(viewsets.ModelViewSet):
|
||||||
|
|||||||
Reference in New Issue
Block a user