Opened 6 years ago

Closed 6 years ago

Last modified 6 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: master
Severity: Keywords:
Cc: bronger@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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@…> 6 years ago.
patch with unittests to validate formset error types.

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by Harm Geerts <hgeerts@…>

Attachment: 15167.diff added

patch with unittests to validate formset error types.

comment:1 Changed 6 years ago by Russell Keith-Magee

Triage Stage: UnreviewedReady for checkin

comment:2 Changed 6 years ago by Torsten Bronger

Cc: bronger@… added

comment:3 Changed 6 years ago by Russell Keith-Magee

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 Changed 6 years ago by Russell Keith-Magee

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 Changed 6 years ago by Ramiro Morales

In [15430]:

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

comment:6 Changed 6 years ago by Ramiro Morales

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