Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#15167 closed (fixed)

ModelFormSet changes the return type of ModelForm.non_field_errors()

Reported by: Harm Geerts <hgeerts@…> Owned by: nobody
Component: Forms Version: dev
Severity: Keywords:
Cc: bronger@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The validate_unique check added in #9493 replaces the ErrorList with a string.
This breaks the expected behaviour[1] for non_field_errors on the form.

[1] http://code.djangoproject.com/browser/django/trunk/django/forms/forms.py#L237

Attachments (1)

15167.diff (2.9 KB ) - added by Harm Geerts <hgeerts@…> 13 years ago.
patch with unittests to validate formset error types.

Download all attachments as: .zip

Change History (7)

by Harm Geerts <hgeerts@…>, 13 years ago

Attachment: 15167.diff added

patch with unittests to validate formset error types.

comment:1 by Russell Keith-Magee, 13 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Torsten Bronger, 13 years ago

Cc: bronger@… added

comment:3 by Russell Keith-Magee, 13 years ago

Resolution: fixed
Status: newclosed

In [15424]:

Fixed #15167 -- Ensure that non-form errors are always part of an ErrorList. Thanks to Harm Geerts for the report and patch.

comment:4 by Russell Keith-Magee, 13 years ago

In [15425]:

[1.2.X] Fixed #15167 -- Ensure that non-form errors are always part of an ErrorList. Thanks to Harm Geerts for the report and patch.

Backport of r15424 from trunk.

comment:5 by Ramiro Morales, 13 years ago

In [15430]:

Modified wrong expected model formset output in a couple of additional tests after fix introduced in [15424]. Refs #15167.

comment:6 by Ramiro Morales, 13 years ago

In [15431]:

[1.2.X] Modified wrong expected model formset output in a couple of additional tests after fix introduced in [15424]. Refs #15167.

Backport of [15430] from trunk.

Note: See TracTickets for help on using tickets.
Back to Top