-
Notifications
You must be signed in to change notification settings - Fork 303
Open
Description
Describe the bug
When I switch a model field from editable=True to editable=False, the documentation correctly still lists the field in reading (list, retrieve, etc) views, but stops including the enum.
To Reproduce
class TestChoices(models.TextChoices):
TEST = "test"
class TestModel(models.Model):
test_role = models.CharField(choices=TestChoices.choices, max_length=4, null=True, default=None, editable=True)
class TestModelSerializer(serializers.ModelSerializer)
class Meta:
model = TestModel
fields = ("id", "test_role")Generate a schema, observe the enum present, then switch the test_role field to editable=False and see the enum disappear.
I tried turning COMPONENT_SPLIT_REQUEST off, which I usually have on, but the setting doesn’t make a difference (not that it should, just reporting this attempt for completeness).
Metadata
Metadata
Assignees
Labels
No labels