Commit 05b0c2ad by Tom Christie

Don't list M2M choices in OPTIONS requests. Refs #3751. (#4160)

parent 014e24b0
......@@ -138,7 +138,7 @@ class SimpleMetadata(BaseMetadata):
field_info['children'] = self.get_serializer_info(field)
if (not field_info.get('read_only') and
not isinstance(field, serializers.RelatedField) and
not isinstance(field, (serializers.RelatedField, serializers.ManyRelatedField)) and
hasattr(field, 'choices')):
field_info['choices'] = [
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment