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.
This commit is contained in:
@@ -161,6 +161,7 @@ class DocumentSerializer(serializers.HyperlinkedModelSerializer):
|
||||
'latest_version', 'url', 'uuid', 'versions',
|
||||
)
|
||||
model = Document
|
||||
read_only_fields = ('document_type',)
|
||||
|
||||
|
||||
class NewDocumentSerializer(serializers.ModelSerializer):
|
||||
|
||||
Reference in New Issue
Block a user