From 3de3d1ed4ef4b2584dba5482222f0ec9c4cc863f Mon Sep 17 00:00:00 2001 From: Harald Nezbeda Date: Wed, 24 Nov 2021 10:44:19 +0100 Subject: [PATCH] Fixes context choices in attachment serizlier --- drf_attachments/rest/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drf_attachments/rest/serializers.py b/drf_attachments/rest/serializers.py index 1cbd82d..6392e87 100644 --- a/drf_attachments/rest/serializers.py +++ b/drf_attachments/rest/serializers.py @@ -26,7 +26,7 @@ class AttachmentSerializer(serializers.ModelSerializer): file = FileField(write_only=True, required=True) content_object = get_content_object_field() - context = ChoiceField(choices=attachment_context_choices()) + context = ChoiceField(choices=attachment_context_choices(values_list=False)) class Meta: model = Attachment