Fix: Image should be both readable and writable

This commit is contained in:
winkidney
2019-02-21 13:14:15 +08:00
parent e0a074fd9f
commit 274134444d
2 changed files with 1 additions and 2 deletions

View File

@@ -43,7 +43,6 @@ class ImageSerializer(serializers.ModelSerializer):
extra_kwargs = {
"width": {"read_only": True},
"height": {"read_only": True},
"image": {"read_only": True},
}
standard = ThumbnailSerializer(read_only=True)

View File

@@ -17,7 +17,7 @@ class ImageViewSet(mixins.CreateModelMixin, GenericViewSet):
serializer_class = api.ImageSerializer
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):