Re: [Django] #36618: BaseForm.add_error() misleading exception message when both field and dict provided (was: Forms.add_error() misleading exception message)

0 views
Skip to first unread message

Django

unread,
Sep 23, 2025, 9:13:57 PM9/23/25
to django-...@googlegroups.com
#36618: BaseForm.add_error() misleading exception message when both field and dict
provided
--------------------------------------+------------------------------------
Reporter: Chris Brand | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Forms | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Jacob Walls):

* component: Uncategorized => Forms
* easy: 0 => 1
* stage: Unreviewed => Accepted
* summary: Forms.add_error() misleading exception message =>
BaseForm.add_error() misleading exception message when both field and
dict provided
* type: Uncategorized => Cleanup/optimization

Comment:

Good spot, happy to take a PR replacing the reference to "multiple fields"
with a mention of a dictionary instead. Incidentally this condition
[https://djangoci.com/view/%C2%ADCoverage/job/django-
coverage/HTML_20Coverage_20Report/ isn't tested], so we'll benefit from
the addition of a test.
--
Ticket URL: <https://code.djangoproject.com/ticket/36618#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 23, 2025, 9:48:30 PM9/23/25
to django-...@googlegroups.com
#36618: BaseForm.add_error() misleading exception message when both field and dict
provided
-------------------------------------+-------------------------------------
Reporter: Chris Brand | Owner:
Type: | The5cheduler
Cleanup/optimization | Status: assigned
Component: Forms | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* component: Testing framework => Forms
* easy: 0 => 1
* needs_better_patch: 0 => 1
* needs_tests: 1 => 0
* summary: Forms.add_error() misleading exception message =>
BaseForm.add_error() misleading exception message when both field and
dict provided
* type: Uncategorized => Cleanup/optimization

Comment:

Thanks for volunteering. I think my triage came in while you were working
on a PR, so be sure to read the triage decision: a PR to adjust the
exception message is welcome, but it wouldn't be in scope to change the
underlying behavior.
--
Ticket URL: <https://code.djangoproject.com/ticket/36618#comment:5>
Reply all
Reply to author
Forward
0 new messages