Skip to content

Use OrderedDict for RelatedField.choices. #2408

Closed
@kylemacfarlane

Description

@kylemacfarlane

The order of choices is useful when returning metadata. For ChoiceFields DRF uses an OrderedDict but for RelatedFields everything is put into a regular dict which loses order.

https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/relations.py#L106

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions