PrimaryKeyRelatedField label not inheriting correctly from ManyToMany field's verbose_name #9183
Unanswered
ntouran
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Imagine you have a ModelSerializer with a field defined like this:
This is related to a model field from a Django model:
When you run an OPTION call on an ModelViewSet configured to return that serializer, you get:
but you should get label based on the
verbose_name
:If you configure the Serializer field like this, it works as expected:
But shouldn't the
label
be introspected without having to do that manually? I think it's a bug right?Beta Was this translation helpful? Give feedback.
All reactions