#25942: TypedChoiceField.has_changed behaviour has changed between 1.8 and 1.9 ----------------------------+-------------------- Reporter: arthru | Owner: nobody Type: Bug | Status: new Component: Forms | Version: 1.9 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ----------------------------+-------------------- We've met a strange bug with Django 1.9 on TypedChoiceField.has_changed.
We encountered the bug when using a TypedChoiceField in a form of a formset. When we have an empty extra form, and we submit all the form, the submitted form is not validated due to some "changes" made to the TypedChoiceFields. The excepted behavior would be to save the formset data without treating that extra form. I finally found that the method has_changed of a field has been modified from 1.8, and calls self._coerce for the initial value. By removing it, my use case now works like expected. I attach to this ticket a unit test that reproduces my case. -- Ticket URL: <https://code.djangoproject.com/ticket/25942> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/049.71a63379a3b3035888a36caae7010b31%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.