#26917: Disabled fields don't validate anymore in 1.10 -------------------------------+-------------------- Reporter: karyon | Owner: nobody Type: Bug | Status: new Component: Uncategorized | Version: 1.10 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+-------------------- i have several tests that fail when trying to submit a form that has disabled fields in 1.10, which worked in 1.9, and also works when making it disabled=False. example stacktrace:
{{{ Traceback (most recent call last): File "/vagrant/evap/staff/tests/test_forms.py", line 105, in test_single_result_form_saves_participant_and_voter_count self.assertTrue(form.is_valid()) File "/vagrant/src/django/django/forms/forms.py", line 161, in is_valid return self.is_bound and not self.errors File "/vagrant/src/django/django/forms/forms.py", line 153, in errors self.full_clean() File "/vagrant/src/django/django/forms/forms.py", line 364, in full_clean self._post_clean() File "/vagrant/src/django/django/forms/models.py", line 401, in _post_clean self.instance = construct_instance(self, self.instance, opts.fields, opts.exclude) File "/vagrant/src/django/django/forms/models.py", line 60, in construct_instance f.save_form_data(instance, cleaned_data[f.name]) File "/vagrant/src/django/django/db/models/fields/__init__.py", line 867, in save_form_data setattr(instance, self.name, data) File "/vagrant/src/django/django/db/models/fields/related_descriptors.py", line 203, in __set__ self.field.remote_field.model._meta.object_name, ValueError: Cannot assign "1": "Course.semester" must be a "Semester" instance. }}} code for the form is [https://github.com/fsr- itse/EvaP/blob/b6222413f15fc7256622a31f7045046f7be1e466/evap/staff/forms.py#L149 here] (it's about the semester attribute, and ignore the two methods, this also fails when removing those) and test is [https://github.com/fsr- itse/EvaP/blob/b6222413f15fc7256622a31f7045046f7be1e466/evap/staff/tests/test_forms.py#L104 here]. this regressed in db19619545dd99a1d2502c72974d79eca33acff7. -- Ticket URL: <https://code.djangoproject.com/ticket/26917> 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.9fb15ad051a2544adfabfc7d01ac16a2%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.