Skip to content

ChoiceField with required=False not optional in HTML view #2184

@brianmay

Description

@brianmay

Hello,

I have a db model containing:

action = models.CharField(max_length=4, null=True, blank=True, choices=PHOTO_ACTION, db_index=True)

ModelSerializer I believe turns this into a ChoiceField.

Unfortunately the choice list doesn't list an appropriate value to correspond with None.

I have tried setting required=False, but it has no affect.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions