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

10 views
Skip to first unread message

Django

unread,
Sep 24, 2025, 5:29:04 AM9/24/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: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* stage: Unreviewed => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/36618#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 26, 2025, 12:44:11 PM9/26/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: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by The5cheduler):

Thank you @jacobtylerwalls
I have adjusted the files to update the messaging of the error without
updating underlying behavior of the method.
--
Ticket URL: <https://code.djangoproject.com/ticket/36618#comment:7>

Django

unread,
Dec 9, 2025, 11:33:25 PM12/9/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: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Nilesh Pahari):

Hi! Since this has been open for a while, can I pick it up?
--
Ticket URL: <https://code.djangoproject.com/ticket/36618#comment:8>

Django

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

* owner: The5cheduler => Nilesh Pahari

--
Ticket URL: <https://code.djangoproject.com/ticket/36618#comment:9>

Django

unread,
Dec 18, 2025, 4:06:38 PM12/18/25
to django-...@googlegroups.com
#36618: BaseForm.add_error() misleading exception message when both field and dict
provided
-------------------------------------+-------------------------------------
Reporter: Chris Brand | Owner: Nilesh
Type: | Pahari
Cleanup/optimization | Status: assigned
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 Nilesh Pahari):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/36618#comment:10>

Django

unread,
Dec 18, 2025, 4:13:26 PM12/18/25
to django-...@googlegroups.com
#36618: BaseForm.add_error() misleading exception message when both field and dict
provided
-------------------------------------+-------------------------------------
Reporter: Chris Brand | Owner: Nilesh
Type: | Pahari
Cleanup/optimization | Status: assigned
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
-------------------------------------+-------------------------------------
Comment (by Nilesh Pahari):

PR: https://github.com/django/django/pull/20426
--
Ticket URL: <https://code.djangoproject.com/ticket/36618#comment:11>

Django

unread,
Dec 18, 2025, 8:04:54 PM12/18/25
to django-...@googlegroups.com
#36618: BaseForm.add_error() misleading exception message when both field and dict
provided
-------------------------------------+-------------------------------------
Reporter: Chris Brand | Owner: Nilesh
Type: | Pahari
Cleanup/optimization | Status: assigned
Component: Forms | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Nilesh Pahari):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36618#comment:12>

Django

unread,
Dec 19, 2025, 2:56:20 PM12/19/25
to django-...@googlegroups.com
#36618: BaseForm.add_error() misleading exception message when both field and dict
provided
-------------------------------------+-------------------------------------
Reporter: Chris Brand | Owner: Nilesh
Type: | Pahari
Cleanup/optimization | Status: assigned
Component: Forms | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/36618#comment:13>

Django

unread,
Dec 19, 2025, 3:10:22 PM12/19/25
to django-...@googlegroups.com
#36618: BaseForm.add_error() misleading exception message when both field and dict
provided
-------------------------------------+-------------------------------------
Reporter: Chris Brand | Owner: Nilesh
Type: | Pahari
Cleanup/optimization | Status: closed
Component: Forms | Version: 5.2
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"e49e14fd9032feb7a8cf254658ac4e74a4ffb712" e49e14f]:
{{{#!CommitTicketReference repository=""
revision="e49e14fd9032feb7a8cf254658ac4e74a4ffb712"
Fixed #36618 -- Corrected error message in BaseForm.add_error().

The error message now correctly states that the error argument
is a dictionary.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36618#comment:14>
Reply all
Reply to author
Forward
0 new messages