From 3634284c5c8203e2b08b8520152cd8843905155e Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 30 Jan 2017 00:46:56 -0400 Subject: [PATCH] Set the document type in the document serializer to read only. This change improves PUT requests and changing the document type via the API is not supported anyways. --- mayan/apps/documents/serializers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mayan/apps/documents/serializers.py b/mayan/apps/documents/serializers.py index 4dbc21a21f..6ca01dab70 100644 --- a/mayan/apps/documents/serializers.py +++ b/mayan/apps/documents/serializers.py @@ -161,6 +161,7 @@ class DocumentSerializer(serializers.HyperlinkedModelSerializer): 'latest_version', 'url', 'uuid', 'versions', ) model = Document + read_only_fields = ('document_type',) class NewDocumentSerializer(serializers.ModelSerializer):