Serializers: allow encryptionKey to be null.
This commit is contained in:
parent
3dfceb63b1
commit
f147f4ae58
@ -122,7 +122,7 @@ class CollectionItemRevisionSerializer(serializers.ModelSerializer):
|
|||||||
|
|
||||||
|
|
||||||
class CollectionItemSerializer(serializers.ModelSerializer):
|
class CollectionItemSerializer(serializers.ModelSerializer):
|
||||||
encryptionKey = BinaryBase64Field(required=False, default=None)
|
encryptionKey = BinaryBase64Field(required=False, default=None, allow_null=True)
|
||||||
etag = serializers.CharField(allow_null=True, write_only=True)
|
etag = serializers.CharField(allow_null=True, write_only=True)
|
||||||
content = CollectionItemRevisionSerializer(many=False)
|
content = CollectionItemRevisionSerializer(many=False)
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ class CollectionSerializer(serializers.ModelSerializer):
|
|||||||
stoken = serializers.CharField(read_only=True)
|
stoken = serializers.CharField(read_only=True)
|
||||||
|
|
||||||
uid = serializers.CharField(source='main_item.uid')
|
uid = serializers.CharField(source='main_item.uid')
|
||||||
encryptionKey = BinaryBase64Field(source='main_item.encryptionKey', required=False, default=None)
|
encryptionKey = BinaryBase64Field(source='main_item.encryptionKey', required=False, default=None, allow_null=True)
|
||||||
etag = serializers.CharField(allow_null=True, write_only=True)
|
etag = serializers.CharField(allow_null=True, write_only=True)
|
||||||
version = serializers.IntegerField(min_value=0, source='main_item.version')
|
version = serializers.IntegerField(min_value=0, source='main_item.version')
|
||||||
content = CollectionItemRevisionSerializer(many=False, source='main_item.content')
|
content = CollectionItemRevisionSerializer(many=False, source='main_item.content')
|
||||||
|
Loading…
Reference in New Issue
Block a user