From 91aadb65656cbc0676ccdfea9b1b8f7c7d316140 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 27 May 2020 10:16:55 +0300 Subject: [PATCH] Make etag write-only. --- django_etesync/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django_etesync/serializers.py b/django_etesync/serializers.py index 75baba0..f78803a 100644 --- a/django_etesync/serializers.py +++ b/django_etesync/serializers.py @@ -114,7 +114,7 @@ class CollectionItemRevisionSerializer(serializers.ModelSerializer): class CollectionItemSerializer(serializers.ModelSerializer): encryptionKey = BinaryBase64Field() - etag = serializers.CharField(allow_null=True) + etag = serializers.CharField(allow_null=True, write_only=True) content = CollectionItemRevisionSerializer(many=False) class Meta: @@ -181,7 +181,7 @@ class CollectionSerializer(serializers.ModelSerializer): encryptionKey = CollectionEncryptionKeyField() accessLevel = serializers.SerializerMethodField('get_access_level_from_context') stoken = serializers.CharField(read_only=True) - etag = serializers.CharField(allow_null=True) + etag = serializers.CharField(allow_null=True, write_only=True) content = CollectionItemRevisionSerializer(many=False) class Meta: