Opened 4 years ago

Closed 4 years ago

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

Download all attachments as: .zip

Change History (7)

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

patch with unittests to validate formset error types.

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 4 years ago by bronger

  • Cc bronger@… added

comment:3 Changed 4 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

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 4 years ago by russellm

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 4 years ago by ramiro

In [15430]:

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

comment:6 Changed 4 years ago by ramiro

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