Form no longer validates after upgrading django from 2.0.5 to 2.1. Should I report a bug?

13 views
Skip to first unread message

Franc Boekelo

unread,
Dec 31, 2018, 8:24:49 AM12/31/18
to Django users
Hello,

In our project we have a Model with this field:

    has_drivers_license = models.BooleanField(verbose_name=_('Heeft rijbewijs'), default=False, choices=BOOL_CHOICES)

and we have a ModelForm, where this field is used:

    fields = [... 'has_drivers_license', ]

and we use a radio select widget:

    widgets = {
'has_drivers_license': forms.RadioSelect
}

Now, in one specific template where we use this form, we don't include this specific field. In the view, the form would validate anyway. After upgrading to django 2.1  (from 2.0.5), this form no longer validates, saying that has_drivers_license is required. 
I have now added "blank = True" to the Model field, after which the form validates again.

Should I report a bug? I didn't see anything in the release notes that would lead to me to expect backward incompatible behavior on this issue.

Thanks! 

Tim Graham

unread,
Dec 31, 2018, 9:25:53 AM12/31/18
to Django users

The old behavior looks like a bug to me (can you explain why it would be expected?) and we don't generally document bug fixes in the release notes.

Franc Boekelo

unread,
Dec 31, 2018, 10:39:02 AM12/31/18
to Django users
Fair enough.
I think the behavior makes sense the way it is, so I'll leave it.
Reply all
Reply to author
Forward
0 new messages