Closed atbigelow closed 5 years ago
Having null=True in a CharField and child fields sets an 'empty_value' key in the kwargs for the widget. You can see this logic in https://github.com/django/django/blob/stable/2.1.x/django/db/models/fields/__init__.py#L1091
But empty_value is NOT an argument for MultiValueField as seen here https://github.com/django/django/blob/stable/2.1.x/django/forms/fields.py#L971
My links are for 2.1.x but also refers to 2.2.x (which I am using).
Current workaround is to just not use null=True.
Thanks for the report! Django docs discourage setting null=True for CharFields and their descendants, but we shouldn't be causing an exception. Just released 1.7.1 with a fix.
null=True
Having null=True in a CharField and child fields sets an 'empty_value' key in the kwargs for the widget. You can see this logic in https://github.com/django/django/blob/stable/2.1.x/django/db/models/fields/__init__.py#L1091
But empty_value is NOT an argument for MultiValueField as seen here https://github.com/django/django/blob/stable/2.1.x/django/forms/fields.py#L971
My links are for 2.1.x but also refers to 2.2.x (which I am using).
Current workaround is to just not use null=True.