ChoiceField with required=False not optional in HTML view · Issue #2184 · encode/django-rest-framework (original) (raw)

@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.