Skip to content

Commit

Permalink
Don't list M2M choices in OPTIONS requests. Refs #3751.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchristie committed Jun 1, 2016
1 parent 014e24b commit 0c8b98f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_field_info(self, field):
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'] = [
{
Expand Down

0 comments on commit 0c8b98f

Please sign in to comment.