Opened 18 years ago

Closed 18 years ago

#3139 closed defect (fixed)

[patch] BoundField._errors() returns an empty ErrorList() when using Form's prefix option

Reported by: jkocherhans Owned by: Adrian Holovaty
Component: Forms Version:
Severity: normal Keywords:
Cc: jkocherhans@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

_errors() looks for self.form.errors[self.name], which is fine until you use a prefix. In that case, self.name is the prefixed version which won't and shouldn't be found in form.errors

Attachments (1)

prefix-errors.diff (2.3 KB ) - added by jkocherhans 18 years ago.
The fix could probably be simpler, but I think this is more clear.

Download all attachments as: .zip

Change History (3)

by jkocherhans, 18 years ago

Attachment: prefix-errors.diff added

The fix could probably be simpler, but I think this is more clear.

comment:1 by jkocherhans, 18 years ago

Cc: jkocherhans@… added
Component: Admin interfacedjango.newforms

comment:2 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: newclosed

(In [4199]) Fixed #3139 -- newforms BoundField no longer returns empty errors when using a prefix. Thanks, jkocherhans

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