From 826b5a889704452c53c05a44905f9fa62889ff34 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Fri, 10 Oct 2014 15:34:00 +0100 Subject: [PATCH] Relations in 'read_only_fields' should not include a queryset kwarg --- rest_framework/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index f3f5c837f..bc9c15eb3 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -640,7 +640,7 @@ class ModelSerializer(Serializer): for attr in [ 'required', 'default', 'allow_blank', 'allow_null', 'min_length', 'max_length', 'min_value', 'max_value', - 'validators' + 'validators', 'queryset' ]: kwargs.pop(attr, None) kwargs.update(extras)